Skip to content

Commit

Permalink
Merge pull request #81 from NSLS-II/use-lists
Browse files Browse the repository at this point in the history
Do not use numpy arrays for variable-shaped objects.
  • Loading branch information
mrakitin committed Nov 17, 2023
2 parents a29d5da + 8e79605 commit cc61595
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyCHX/chx_compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def para_compress_eigerdata(
images_per_file=images_per_file,
)

res_ = np.array([results[k].get() for k in list(sorted(results.keys()))])
res_ = [results[k].get() for k in list(sorted(results.keys()))]
imgsum = np.zeros(N)
bad_frame_list = np.zeros(N, dtype=bool)
good_count = 1
Expand Down Expand Up @@ -385,9 +385,9 @@ def para_compress_eigerdata(


def combine_compressed(filename, Nf, del_old=True):
old_files = np.concatenate(
np.array([[filename + "-header"], [filename + "_temp-%i.tmp" % i for i in range(Nf)]])
)
old_files = [filename + "-header"]
for i in range(Nf):
old_files.append(filename + "_temp-%i.tmp")
combine_binary_files(filename, old_files, del_old)


Expand Down

0 comments on commit cc61595

Please sign in to comment.