Remove extraction from Vec for PyArrayLikeDyn - #496
Conversation
|
Thanks for the PR, sorry for the slow review. CI looks to be falling, though I wonder if it's not actually related... 🤔 @ngoldbaum do I recall something about numpy removing support for Windows x86? Did that happen? |
|
Nope, and upstream CPython isn't planning to either. |
|
Flipped PR to rerun CI with |
|
@davidhewitt any chance this PR could be tested / merged? If help is needed to get this across the finish line I'd be glad to step in for @jakemoran if needed. |
|
Thanks and sorry that it took so long for this to get through. I took the liberty to rebase this. Additionally I added the same special casing to the n-dim case that we already have for the 1d variant: if the src type is not already an array, we allow the type change. That fixes the changed test and makes the different versions more consistent. |
Resolves #491
There seems to be a minor breaking change with this fix where some conversions to
PyArrayLikeDynmay now requireAllowTypeChangewhere it wasn't needed previously (which can be seen in the modified test). It seems like this is the correct behavior to me, since the element type is changing, and this makes the behavior in line with conversions from dynamic arrays of higher dimensionality. Still breaking so I'm open to discussion on whether this is the right call or not.I added one extra test that reproduces the issue from #491 and now passes.