PyO3 / rust-numpy

PyO3-based Rust bindings of the NumPy C-API
BSD 2-Clause "Simplified" License
1.07k stars 98 forks source link

migrate `PyArray` contructors to `Bound` API (Part 2) #418

Closed Icxolu closed 4 months ago

Icxolu commented 4 months ago

Following #416

This continues the migration of PyArray constructors to the Bound API. This migrates with PyArray::{from_slice, arange}.

adamreichold commented 4 months ago

Some doctests seem to fail to compile. You check the doc build using ./x.py d.

Please also have a look whether the benchmarks need adjustments. They are included in the default ./x.py action.

Icxolu commented 4 months ago

Please also have a look whether the benchmarks need adjustments. They are included in the default ./x.py action.

Sure, I'll check again once #417 is merged

Icxolu commented 4 months ago

Rebased and updated benchmarks. For reference: The deprecation warnings in the benchmarks did not show up on ./x.py for me

adamreichold commented 4 months ago

The deprecation warnings in the benchmarks did not show up on ./x.py for me

Ah yes, the script checks if a nightly toolchain is used and builds the benchmarks only in this case (as they require std's unstable test feature).