ENH: Add copy and device keyword to np.asanyarray to match np.asarray#26580
ENH: Add copy and device keyword to np.asanyarray to match np.asarray#26580mattip merged 9 commits intonumpy:mainfrom
Conversation
|
This needs a release note. It should be versionadded for 2.1 since I don't think it's an emergency to backport this for 2.0. Also needs new tests. |
|
I've added a release note as per suggested. Is there a way to flag this change for 2.1 in the release note? As for the tests, the underlying implementation for |
That is automatic in the release notes; the tooling knows how to assemble the release notes for the next version from these snippets. And you already used
Yes, this will be useful. Any public API construct should have at least a single direct test even when the underlying machinery is tested extensively in some other way. Probably |
Oh my bad, I completely forgot I did that, I've made the changes. If the only new tests to add are related to the static PyObject *
array_device(PyArrayObject *self, void *NPY_UNUSED(ignored))
{
return PyUnicode_FromString("cpu");
} |
|
I think you only test that |
|
Okay, I've added new tests |
mattip
left a comment
There was a problem hiding this comment.
LGTM. One typo and an optional vertical spacing suggestion
Co-authored-by: Matti Picus <[email protected]>
Co-authored-by: Matti Picus <[email protected]>
Co-authored-by: Matti Picus <[email protected]>
|
Yea I think adding one more newline looks nicer too, Ive commited the suggestions |
|
Thanks @JuliaPoo |
See #26196