Skip to content

Commit

Permalink
Merge pull request #207 from jjhelmus/rm_np_product
Browse files Browse the repository at this point in the history
remove use of np.product in favor of np.prod
  • Loading branch information
jjhelmus authored Nov 15, 2023
2 parents a4c3ff1 + 7823ee9 commit 3c8def0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nmrglue/fileio/bruker.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ def read(dir=".", bin_file=None, acqus_files=None, pprog_file=None, shape=None,
except FileNotFoundError:
warn("NUS data detected, but nuslist was not found")
except KeyError:
# old datasets do not have the FnTYPE parameter in acqus files.
# old datasets do not have the FnTYPE parameter in acqus files.
# also fails silently when acqus file is absent.
pass

return dic, data


Expand Down Expand Up @@ -551,15 +551,15 @@ def read_lowmem(dir=".", bin_file=None, acqus_files=None, pprog_file=None,
f = os.path.join(dir, bin_file)
_, data = read_binary_lowmem(f, shape=shape, cplex=cplex, big=big,
isfloat=isfloat)

try:
if dic['acqus']['FnTYPE'] == 2: # non-uniformly sampled data
try:
dic['nuslist'] = read_nuslist(dir)
except FileNotFoundError:
warn("NUS data detected, but nuslist was not found")
except KeyError:
# old datasets do not have the FnTYPE parameter in acqus files.
# old datasets do not have the FnTYPE parameter in acqus files.
# also fails silently when acqus file is absent.
pass

Expand Down Expand Up @@ -1501,7 +1501,7 @@ def reorder_submatrix(data, shape, submatrix_shape, reverse=False):
return data

sub_per_dim = [int(i / j) for i, j in zip(shape, submatrix_shape)]
nsubs = np.product(sub_per_dim)
nsubs = np.prod(sub_per_dim)

if reverse:
rdata = np.empty([nsubs] + list(submatrix_shape))
Expand Down

0 comments on commit 3c8def0

Please sign in to comment.