8000 Convert isposinf and isneginf from 'ufunclike' to proper ufunc objects (Trac #876) · Issue #1474 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Convert isposinf and isneginf from 'ufunclike' to proper ufunc objects (Trac #876) #1474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 4 comments

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/876 on 2008-08-06 by @bsouthey, assigned to unknown.

Both isposinf() and isneginf() return only return a boolean array. In contrast, both isinf() and isnan() return a numpy boolean for a scalar input and a numpy boolean array for array-like input.

import numpy as np
np.__version__            # returns: '1.1.0'
type(np.isinf(np.inf))    # returns: <type 'numpy.bool_'>
type(np.isposinf(np.inf)) # returns: <type 'numpy.ndarray'>
type(np.isneginf(np.inf)) # returns: <type 'numpy.ndarray'>
@numpy-gitbot
Copy link
Author

@mwiebe wrote on 2011-03-23

This is because isposinf and isneginf are not ufuncs, they're in numpy.lib.unfunclike instead. The fix is to convert them to proper ufuncs.

@numpy-gitbot
Copy link
Author

Title changed from Both isposinf and isneginf return an array for a scalar input to Convert isposinf and isneginf from 'ufunclike' to proper ufunc objects by @mwiebe on 2011-03-23

@eric-wieser
Copy link
Member

As of #8996, all three functions return a bool_ scalar for 0d array input.

@mhvk
Copy link
Contributor
mhvk commented May 4, 2017

Closing given the fix in #8996.

@mhvk mhvk closed this as completed May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0