Skip to content

Should datasets/spectra also work with non numpy array. #43

@ajasja

Description

@ajasja

Right now if a non- np.ndarray somehow gets into a Dataset an exception is raised when doing addition/subtraction.

this is because

a = [1,2,3]
a == a

returns True, but

anp = np.array(a)
anp == anp

returns array([ True, True, True], dtype=bool)

I temporarily solved this by writing a make_numpy_array function that returns a np.ndarray.
Perhaps we should solve this also in another way, by replacing the code any(x == y) with something that can handle both array and ndarray.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions