You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the module repeatedly calls from numpy import *, which, aside from being bad practice, actually has stomped on one of it's own functions.
The camfr function full(), as in set_mode_correct(full), has been replaced by numpy.full() (which presumably didn't exist in ~2005). This now pops an error.
set_mode_correction(full)
Boost.Python.ArgumentError: Python argument types in
camfr._camfr.set_mode_correction(function)
did not match C++ signature:
set_mode_correction(Mode_correction)
Must go thru the python files and replace the import statement with import numpy as np and go through to prepend all numpy functions with np.!
The last global import is in __init__.py, where it calls from pylab import *. Not sure which modules use this.
This does actually generate a full() function from numpy, but _camfr.so is loaded afterwards, so CAMFR stomps on numpy's full function, so CAMFR works as expected when run with import camfr as *.
Should remove this line, but find out where it is used first to see if it'll break anything.
From @demisjohn on February 28, 2018 9:38
the module repeatedly calls
from numpy import *
, which, aside from being bad practice, actually has stomped on one of it's own functions.The camfr function
full()
, as inset_mode_correct(full)
, has been replaced bynumpy.full()
(which presumably didn't exist in ~2005). This now pops an error.Must go thru the python files and replace the import statement with
import numpy as np
and go through to prepend all numpy functions withnp.
!Copied from original issue: #5
The text was updated successfully, but these errors were encountered: