This release matches PyO3 version 0.20.0 and follows its MSRV increase to Rust 1.56. It adds support for fixed size string-like elements via PyFixedString and PyFixedUnicode, adds support for the bfloat16 element type often added to NumPy by third-party packages and introduces the PyArrayLike receiver type to provide flexible yet efficient array-based API.
Add a prelude module to simplify importing method traits required by the Bound API. (#417)
Extend documentation to cover some more surprising behaviours. (#405) (#414)
v0.20.0
Increase MSRV to 1.56 released in October 2021 and available in Debain 12, RHEL 9 and Alpine 3.17 following the same change for PyO3. (#378)
Add support for ASCII (PyFixedString<N>) and Unicode (PyFixedUnicode<N>) string arrays, i.e. dtypes SN and UN where N is the number of characters. (#378)
Add support for the bfloat16 dtype by extending the optional integration with the half crate. Note that the bfloat16 dtype is not part of NumPy itself so that usage requires third-party packages like Tensorflow. (#381)
Add PyArrayLike type which extracts PyReadonlyArray if a NumPy array of the correct type is given and attempts a conversion using numpy.asarray otherwise. (#383)
v0.19.0
Add PyUntypedArray as an untyped base type for PyArray which can be used to inspect arguments before more targeted downcasts. This is accompanied by some methods like dtype and shape moving from PyArray to PyUntypedArray. They are still accessible though, as PyArray dereferences to PyUntypedArray via the Deref trait. (#369)
Drop deprecated PyArray::from_exact_iter as it does not provide any benefits over PyArray::from_iter. (#370)
v0.18.0
Add conversions from and to datatypes provided by the nalgebra crate. (#347)
Drop our wrapper for NumPy iterators which were deprecated in v0.16.0 as ndarray's iteration facilities are almost always preferable. (#324)
Dynamic borrow checking now uses a capsule-based API and therefore works across multiple extensions using PyO3 and potentially other bindings or languages. (#361)
v0.17.2
Fix unsound aliasing into Box<[T]> when converting them into NumPy arrays. (#351)
v0.17.1
Fix use-after-free in PyArray::resize, PyArray::reshape and PyArray::reshape_with_order. (#341)
Fix UB in ToNpyDims::as_dims_ptr with dimensions of dynamic size (-1). (#344)
v0.17.0
Add dynamic borrow checking to safely construct references into the interior of NumPy arrays. (#274)
The deprecated iterator builders NpySingleIterBuilder::{readonly,readwrite} and NpyMultiIterBuilder::add_{readonly,readwrite} now take referencces to PyReadonlyArray and PyReadwriteArray instead of consuming them.
The destructive PyArray::resize method is now unsafe if used without an instance of PyReadwriteArray. (#302)
Add support for datetime64 and timedelta64 element types via the datetime module. (#308)
Add support for IEEE 754-2008 16-bit floating point numbers via an optional dependency on the half crate. (#314)
The inner, dot and einsum functions can also return a scalar instead of a zero-dimensional array to match NumPy's types (#285)
The PyArray::resize function supports n-dimensional contiguous arrays. (#312)
Deprecate PyArray::from_exact_iter after optimizing PyArray::from_iter. (#292)
Remove DimensionalityError and TypeError from the public API as they never used directly. (#315)
Remove the deprecated PyArrayDescr::get_type which was replaced by PyArrayDescr::typeobj in the last cycle. (#308)
Fix returning invalid slices from PyArray::{strides,shape} for rank zero arrays. (#303)
v0.16.2
Fix build on platforms where c_char is u8 like Linux/AArch64. (#296)
v0.16.1
Fix build when PyO3's multiple-pymethods feature is used. (#288)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on numpy to permit the latest version.
Release notes
Sourced from numpy's releases.
Changelog
Sourced from numpy's changelog.
... (truncated)
Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show