Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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