-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Refactor type coercion #23
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Kinds, and CanCoerceScalar Also add print_coercion_tables.py to aid when refactoring type casting/coercion/promotion.
Committed. |
mwiebe
added a commit
to mwiebe/numpy
that referenced
this pull request
Sep 30, 2011
Also incorporated part of Han Genuit's pull request numpy#23, to try and reduce the difficulty dealing with the merge conflict that will result from these concurrent changes
mwiebe
added a commit
that referenced
this pull request
Oct 1, 2011
Also incorporated part of Han Genuit's pull request #23, to try and reduce the difficulty dealing with the merge conflict that will result from these concurrent changes
WeatherGod
pushed a commit
to WeatherGod/numpy
that referenced
this pull request
Jan 22, 2012
Also incorporated part of Han Genuit's pull request numpy#23, to try and reduce the difficulty dealing with the merge conflict that will result from these concurrent changes
shoyer
added a commit
to shoyer/numpy
that referenced
this pull request
Apr 26, 2017
* ENH: Better error message for __array_ufunc__ not implemented New behavior: >>> import numpy as np >>> class Dummy: ... def __array_ufunc__(self, *args, **kwargs): ... return NotImplemented >>> np.negative(Dummy()) TypeError: operand type(s) do not implement __array_ufunc__( <ufunc 'negative'>, '__call__', <__main__.Dummy object at 0x1106df8d0>): 'Dummy' * check for null errmsg_formatter
prototype99
referenced
this pull request
in prototype99/numpy
Jan 4, 2021
fangerer
added a commit
to hpyproject/numpy-hpy
that referenced
this pull request
Jul 7, 2022
Merge in ~STEPAN.SINDELAR_ORACLE.COM/numpy-hpy from fa/ufunc2 to labs-hpy-port * commit '749835fe8392b14da8fb8ab57fc6b363ed8056a8': Do not steal reference in HPyArray_FromAny Print debug warning in npy_get_context; introduce warning level Migrate PyArray_DescrFromScalar and PyArray_DescrNewFromType Move type helpers for scalar types to header Fix: free args array in ufunc_call_impl Migrate PyArray_FromAny, PyArray_AssignFromCache, and PyArray_Pack Migrate coercion_cache_obj to HPy Migrate function PyArray_CastDescrToDType
luyahan
pushed a commit
to plctlab/numpy
that referenced
this pull request
Apr 25, 2024
test: Add testing tool to print var in u8 array
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This started as a change to make type casting and coercion independent of the type number ordering. While it doesn't finish the job, it at least provides a slight performance improvement due to using lookup tables for the built-in types. I've included a testing script which prints out the cancast and coercion results, and they print out the same before/after these changes on my machine.