Skip to content
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

Adds missing numpy dtypes #3330

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Conversation

ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Jun 14, 2024

Adds the following missing numpy dtypes:

  • integer
  • intp
  • number
  • floating
  • signedinteger

Also adds the following numpy functions:

  • issubdtype
  • isscalar
  • iinfo
  • finfo

Code examples:

In [1]: ak.connect()
   ...: import arkouda.numpy as aknp
   ...: aknp.issubdtype(ak.int64, aknp.intp)
Out[1]: True

In [2]: aknp.issubdtype(ak.int64, aknp.number)
Out[2]: True

In [3]: aknp.issubdtype(ak.int64, aknp.integer)
Out[3]: True

In [4]: aknp.issubdtype(ak.float64, aknp.floating)
Out[4]: True

In [5]: aknp.issubdtype(ak.int64, aknp.signedinteger)
Out[5]: True

In [6]: aknp.isscalar(3.5)
Out[6]: True

In [7]: aknp.isscalar("float")
Out[7]: True

In [8]: aknp.isscalar(np.arange(5))
Out[8]: False

In [9]: aknp.isscalar(ak.arange(5))
Out[9]: False

In [10]: aknp.iinfo(ak.int64)
Out[10]: iinfo(min=-9223372036854775808, max=9223372036854775807, dtype=int64)

In [11]: aknp.finfo(ak.float64).dtype
Out[11]: dtype('float64')

Closes #3289 integer dtype
Closes #3288 intp dtype
Closes #3291 number dtype
Closes #3295 floating dtype
Closes #3299 signedinteger dtype
Closes #3298 issubdtype function
Closes #3301 isscalar function
Closes #3287 iinfo function
Closes #3296 finfo funtion

@ajpotts ajpotts force-pushed the 3289-integer-dtype branch from 97d0b71 to 79aef58 Compare June 14, 2024 16:20
@ajpotts ajpotts force-pushed the 3289-integer-dtype branch from 46035c2 to 0ff010c Compare June 14, 2024 16:49
@ajpotts ajpotts marked this pull request as ready for review June 14, 2024 16:54
Copy link
Member

@stress-tess stress-tess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! thanks amanda!

@stress-tess stress-tess enabled auto-merge June 27, 2024 22:02
@stress-tess stress-tess added this pull request to the merge queue Jun 27, 2024
Merged via the queue into Bears-R-Us:master with commit e9023c6 Jun 27, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants