Skip to content

Commit

Permalink
call_mr_transform dtype fix (#93)
Browse files Browse the repository at this point in the history
* fixed dtype for call_mr_transform, removed cap on scipy version

* replaced float with data.dtype

* ensure that fake data has dtype float
  • Loading branch information
sfarrens committed Apr 30, 2020
1 parent b3e835a commit 4815dac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modopt/signal/wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def call_mr_transform(data, opt='', path='./',
''.format(executable, stdout.rstrip('\n')))

# Retrieve wavelet transformed data.
result = fits.getdata(file_mr)
result = fits.getdata(file_mr).astype(data.dtype)

# Remove the temporary files.
if remove_files:
Expand Down Expand Up @@ -226,7 +226,7 @@ def get_mr_filters(data_shape, opt='', coarse=False,
fake_data[tuple(zip(data_shape // 2))] = 1

# Call mr_transform.
mr_filters = call_mr_transform(fake_data, opt=opt)
mr_filters = call_mr_transform(fake_data.astype(float), opt=opt)

if trim:
mr_filters = np.array([trim_filter(f) for f in mr_filters])
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy>=1.16.4
scipy>=1.3.0,<=1.3.3
scipy>=1.3.0
progressbar2>=3.34.3

0 comments on commit 4815dac

Please sign in to comment.