Skip to content

Array params from object #39

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

Merged
3 commits merged into from
Feb 8, 2011
Merged

Conversation

mwiebe
Copy link
Member

@mwiebe mwiebe commented Feb 7, 2011

A new API function for being able to determine the innate data type of an input or output PyObject * before actually converting it to an array or target type.

Also fixes a regression and removes a known failure from test_regression.py.

…#1081)

This function allows code to query an object's "innate" type and
shape, without actually creating a NumPy array out of it.
PyArray_FromAny has been changed to use this function, as an assurance
that its implementation is correct.

This also fixes the known failure in test_regression.py.
@charris
Copy link
Member

charris commented Feb 8, 2011

There are enough new interface functions at this point that it might be worth listing them with a short description and posting on the mailing list. Once they go into a release we will need to support them in perpetuity so a bit of discussion before that fateful step might be a good idea.

@charris
Copy link
Member

charris commented Feb 8, 2011

Committed in 1d952a5. Do you need permissions so that you can close tickets?

@mwiebe
Copy link
Member Author

mwiebe commented Feb 8, 2011

True, it's worth getting the API functions right, and I don't think a rigorous review has consistently been done in the past. I personally would reject calling any function PyArray_2, like PyArray_DescrConverter2, and that's why I came up with CanCastTypeTo as the CanCastTo function with casting parameter. The NpyIter_ functions could certainly use some scrutiny as well.

The only one I added that I think needs changing is PyArray_FillWithZero. It should become PyArray_FillWithValue, and take a double for the value, producing an error if the value passed can't be down-cast without changing its value. The current way to fill an array with a value from C is really cumbersome.

Since we're not rushing into beta at the moment as far as I can tell, there are a few more things I want to add yet. Maybe wait a bit longer before posting for that review?

@mwiebe
Copy link
Member Author

mwiebe commented Feb 8, 2011

Regarding the tickets, yes, I don't have permission to close them currently.

@charris
Copy link
Member

charris commented Feb 8, 2011

OK, I don't know how to handle the trac permissions, or even if I have that authority, so I put in a request.

As to the release schedule, it sounds like Ralf is tied up at least until around June, which I suspect is the end of the school year. No one else has volunteered, so I might need to attempt it myself, which is a bit of a learning experience. IIRC, Ralf took about four months to make his first release. Maybe we should ask Ralf to ask for a volunteer, I know that there was at least one other who did some work on that after David Cournapeau moved on.on.

mattip referenced this pull request in mattip/numpy Mar 20, 2019
rkern added a commit to rkern/numpy that referenced this pull request Jun 22, 2019
* ENH: Expose and use n_children_spawned
* DOC: docstring formatting and cleanups.
* TST: more test coverage of SeedSequence.
fangerer pushed a commit to hpyproject/numpy-hpy that referenced this pull request Jul 7, 2022
Merge in numpy-hpy from ss/array_assing to labs-hpy-port

* commit '7fcca730d29549d7f808b49147619d2cf6eda338':
  Fix: leaking h_desc in array_assign_subscript
  Partial port of np.ravel
  Partial port of array_assign_subscript
luyahan pushed a commit to plctlab/numpy that referenced this pull request Apr 25, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants