jason-neal / spectrum_overload

An astronomy spectrum class with overloaded math operators.

Home Page:http://spectrum-overload.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spectrum ofunc bug in isinstance call.

jason-neal opened this issue · comments

Isinstance is missing a value when array is equal.

/data/jneal/Code/repos/spectrum_overload/spectrum_overload/spectrum.py in ofunc(self=<spectrum_overload.spectrum.S
pectrum object>, other=array([ 2065.        ,  2065.00711976,  2065.014...98493309,
        2184.99246653,  2185.        ]))
    626             if np.isscalar(other):
    627                 other_flux = other
    628             elif not isinstance(other, Spectrum):
    629                 # If the length is the correct length then assume that this is correct to perform.
    630                 if len(other) == len(self.flux):
--> 631                     if not isinstance(np.ndarray):
    632                         other = np.asarray(other)
    633                     other_flux = other
    634                 else:
    635                     raise ValueError(

TypeError: isinstance expected 2 arguments, got 1