replace numpy datatype strings (e.g. "Float64") with types (e.g. "np.float64")
Created by: jdbocarsly
Tiny change to fix a bug:
When attempting a CSA fit on OS X with python 3.9.1
and numpy 1.20.2
, clicking the "Sim" or "Fit" buttons results in a message "Program error. Please report."
The error is:
File "ssnake/src/simFunctions.py", line 530, in zcw_angles js = np.arange(samples, dtype='Float64') / samples
TypeError: data type 'Float64' not understood
Referring to this line: https://github.com/smeerten/ssnake/blob/9817bfcf639d1e91eb727767fe7bc9bffa75b5fe/src/simFunctions.py#L530
The issue (at least for my version of numpy) appears to be that dtype = 'Float64'
is capitalized and just needs to be lowercased. Changing to dtype = 'float64'
or dtype = np.float64
fixed this issue on my machine and Sim and Fit now work.