def read_raw_bin_2d(filename, NP, NI, spe=False):
    data = np.fromfile(filename, dtype='float32').reshape(NI, NP * 2)
    if spe:
        # freq domain is saved reversed and shifted by 1 pt in each dimension,
        # so the first points is 0 in each vector, then N-1, N-2, ... 1
        # A bug? in SIMPSON causes the direct dimension shift to be left off
        # the imaginary data.  In addition the first real point in each vector
        # is the first real point in the spectrum.  Therefore only data[:,1:]
        # will match with other file formats.
        cdata = np.empty((NI, NP), dtype='complex64')
        cdata.real = np.roll(np.roll(data[::-1, NP - 1::-1], 1, 1), 1, 0)
        cdata.imag = np.roll(data[::-1, 2 * NP:NP - 1:-1], 1, 0)
        return {}, cdata
    else:
        # time domain is written as vectors of NP, with the imag appended
        return {}, unappend_data(data)
Mark the host array as changed, broadcast updates if needed.
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/simpson.py/read_raw_bin_2d--crossover with--dataset/ETHPy150Open numba/numba/numba/smartarray.py/SmartArray.host_changed