Skip to content

Maintining ufunc compatibility #4

Description

@msyriac

I've started playing around with enlib and love how it inherits from numpy. But sometimes, the enlib-ness of a map gets stripped away when I pass it to a ufunc. For example:

>>> type(fAlpha)
<class 'enlib.enmap.ndmap'>
>>> retMap = np.fft.ifftshift(enmap.ifft(fAlpha).real)
>>> type(retMap)
<type 'numpy.ndarray'>

How can we prevent this? My workaround right now is to do something like:

retMap = np.fft.ifftshift(enmap.ifft(fAlpha).real)+fAlpha*0.

to allow it to retain its wcs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions