SED from Cube code

Made a pull request while I work on this in case you have comments.
I don't think this will work for `array_like` inputs like e.g. a list of lists, because you call numpy methods on it.
So change to `numpy.array` here for the type of the inputs.