feat: adapt __array__ according to numpy guidelines#3592
Conversation
ianna
left a comment
There was a problem hiding this comment.
@ikrommyd - thanks for the PR—appreciate the enthusiasm! Just a heads-up: I’ve marked it with requested changes so we don’t accidentally merge it before discussing. Going forward, let’s focus on the assigned issues first and loop in a quick chat before tackling anything extra. That way we’re all aligned and can make sure your efforts land exactly where they’re needed.
|
Thanks @ikrommyd, this looks good to me! |
@pfackeldey - thanks for checking this. Let’s discuss it at our next meeting. Implicit copy is something we want to watch out for or actively prevent. |
|
I would like to also add that before this PR, we were copying more than we needed because of this: if dtype is None:
return out
else:
return numpy.array(out, dtype=dtype)That meant that |
|
Needs tests |
|
Hi @ianna, I have added tests for both numpy2 and numpy1 because of slight differences regarding where the |
pfackeldey
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks @ikrommyd
|
Anyone know what to do about the docs failure? It looks like it's timing out when reading the chicago taxi parquet dataset. |
|
Seems like the docs building ci finally didn't crash the last time. Are we good to merge this? 😃 |
Please hold on. We’ll do it later |
Closes #3583
Implements
__array__according to the guidelines specified by https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword and https://numpy.org/devdocs/user/basics.interoperability.html#the-array-method