-
Unreleased
-
v0.21.0
-
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. dtypesSN
andUN
whereN
is the number of characters. (#378) - Add support for the
bfloat16
dtype by extending the optional integration with thehalf
crate. Note that thebfloat16
dtype is not part of NumPy itself so that usage requires third-party packages like Tensorflow. (#381) - Add
PyArrayLike
type which extractsPyReadonlyArray
if a NumPy array of the correct type is given and attempts a conversion usingnumpy.asarray
otherwise. (#383)
-
v0.19.0
- Add
PyUntypedArray
as an untyped base type forPyArray
which can be used to inspect arguments before more targeted downcasts. This is accompanied by some methods likedtype
andshape
moving fromPyArray
toPyUntypedArray
. They are still accessible though, asPyArray
dereferences toPyUntypedArray
via theDeref
trait. (#369) - Drop deprecated
PyArray::from_exact_iter
as it does not provide any benefits overPyArray::from_iter
. (#370)
- Add
-
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)
- Add conversions from and to datatypes provided by the
-
v0.17.2
- Fix unsound aliasing into
Box<[T]>
when converting them into NumPy arrays. (#351)
- Fix unsound aliasing into
-
v0.17.1
-
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}
andNpyMultiIterBuilder::add_{readonly,readwrite}
now take referencces toPyReadonlyArray
andPyReadwriteArray
instead of consuming them. - The destructive
PyArray::resize
method is now unsafe if used without an instance ofPyReadwriteArray
. (#302)
- The deprecated iterator builders
- Add support for
datetime64
andtimedelta64
element types via thedatetime
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
andeinsum
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 optimizingPyArray::from_iter
. (#292) - Remove
DimensionalityError
andTypeError
from the public API as they never used directly. (#315) - Remove the deprecated
PyArrayDescr::get_type
which was replaced byPyArrayDescr::typeobj
in the last cycle. (#308) - Fix returning invalid slices from
PyArray::{strides,shape}
for rank zero arrays. (#303)
- Add dynamic borrow checking to safely construct references into the interior of NumPy arrays. (#274)
-
v0.16.2
- Fix build on platforms where
c_char
isu8
like Linux/AArch64. (#296)
- Fix build on platforms where
-
v0.16.1
- Fix build when PyO3's
multiple-pymethods
feature is used. (#288)
- Fix build when PyO3's
-
v0.16.0
- Bump PyO3 version to 0.16 (#259)
- Support object arrays (#216)
- Support borrowing arrays that are part of other Python objects via
PyArray::borrow_from_array
(#230) - Fixed downcasting ignoring element type and dimensionality (#265)
PyArray::new
is nowunsafe
, as it produces uninitialized arrays (#220)PyArray::iter
,NpySingleIterBuilder::readwrite
andNpyMultiIterBuilder::add_readwrite
are nowunsafe
, as they allow aliasing mutable references to be created (#278/)- The
npyiter
module is deprecated as rust-ndarray's facilities for iteration are more flexible and performant (#280) PyArray::from_exact_iter
does not unsoundly trustExactSizeIterator::len
any more (#262)PyArray::as_cell_slice
was removed as it unsoundly interacts withPyReadonlyArray
allowing safe code to violate aliasing rules (#260)rayon
feature is now removed, and directly specifying the feature viandarray
dependency is recommended (#250)Element
trait andPyArrayDescr
changes (#256):Element
trait has been simplified toget_dtype()
andIS_COPY
- New
PyArrayDescr
methods:of
,into_dtype_ptr
,is_equiv_to
- Added
numpy::dtype
function Element
is now implemented forisize
c32
/c64
have been renamed withComplex32
/Complex64
ShapeError
has been split intoTypeError
andDimensionalityError
i32
,i64
,u32
,u64
are now guaranteed to map tonp.u?int{32,64}
.- Removed
cfg_if
dependency - Removed
DataType
enum
- Added
PyArrayDescr::new
constructor (#266) - New
PyArrayDescr
methods (#266):num
,base
,ndim
,shape
,byteorder
,char
,kind
,itemsize
,alignment
,flags
,has_object
,is_aligned_struct
,names
,get_field
,has_subarray
,has_fields
,is_native_byteorder
- Renamed
get_type
totypeobj
-
v0.15.1
-
v0.15.0
-
v0.14.1
-
v0.14
- Bump PyO3 to 0.14
- Fix conversion bug
-
v0.13.2
- Support ndarray 0.15
-
v0.13.1
- Allow ndarray
>=0.13, < 0.15
to work with Rust 1.41.1. - Add inner, dot, and einsum
- Add PyArray0
- Allow ndarray
-
v0.13.0
- Bump num-complex to 0.3
- Bump ndarray to 0.14
- Bump pyo3 to 0.13
- Drop support for Python 3.5 (as it is now end-of-life).
- Remove unused
python3
feature
-
v0.12.2
- Pin PyO3 minor versions to 0.12
- Pin ndarray minor versions to 0.13
-
v0.12.1
- Fix compile error in Rust 1.39
-
v0.12.0
- Introduce
NpySingleIter
andNpyMultiIter
. - Introduce
PyArrayDescr
.
- Introduce
-
v0.11.0
PyArray::get
is now unsafe.- Introduce
PyArray::get_owned
andPyReadonlyArray::get
.
-
v0.10.0
- Remove
ErrorKind
and introduce some concrete error types. PyArray::as_slice
,PyArray::as_slice_mut
,PyArray::as_array
, andPyArray::as_array_mut
is now unsafe.- Introduce
PyArray::as_cell_slice
,PyArray::to_vec
, andPyArray::to_owned_array
. - Rename
TypeNum
traitElement
, andNpyDataType
DataType
. - Update PyO3 to 0.11
- Remove
-
v0.9.0
- Update PyO3 to 0.10.0
-
v0.8.0
- Update PyO3 to 0.9.0
- Fix SliceBox initialization
-
v0.7.0
- Update PyO3 to 0.8
-
v0.6.0
- Update PyO3 to 0.7
- Drop Python2 support
-
v0.5.0
- Update PyO3 to 0.6
-
v0.4.0
- Duplicate
PyArrayModule
and import Numpy API automatically - Fix memory leak of
IntoPyArray
and addToPyArray
crate - PyArray has dimension as type parameter. Now it looks like
PyArray<T, D>
- Use
ndarray::IntoDimension
to specify dimension - Python2 support
- Duplicate
-
v0.3.1, v0.3.2
- Just update dependencies
-
v0.3.0
- Breaking Change: Migrated to pyo3 from rust-cpython
- Some api addition
- Static type checking with PhantomData
-
v0.2.1
- NEW: trait
IntoPyErr
,IntoPyResult
for error translation
- NEW: trait
-
v0.2.0
- NEW: traits
IntoPyArray
,ToPyArray
- MOD: Interface of
PyArray
creation functions are changed
- NEW: traits
-
v0.1.1
- Update documents
-
v0.1.0
- First Release
- Expose unsafe interface of Array and UFunc API