Releases: Quantco/ndonnx
Releases · Quantco/ndonnx
0.16.0 (2025-08-20)
Bug fix
ndonnx.repeat
now works correctly for zero-sized inputs on the
minimum supported onnxruntime 1.20.1.
New feature
ndonnx.max
(ndonnx.min
) now returns the minimum (maximum) value
for the input data type if the reduction takes place over a zero-sized
input.ndonnx.arange
now also allows arrays as inputs.
0.15.0 (2025-08-13)
New feature
ndonnx.repeat
is now implemented for all built-in data types.
Other changes
- Improve stacklevel presented of various deprecation warnings.
0.14.0 (2025-07-21)
Bug fixes
- Fix a bug in
ndonnx.Array.__setitem__
that occurred when all of the
following applied:- An
Ellipsis
was part of the key - The
Ellipsis
expanded to at least one dimension - The
Ellipsis
was not the last element of the key - The assigned value was not a scalar or 1D array with length 1.
- An
ndonnx.Array.dynamic_shape
now returns a rank-0 array for all input
ranks.- The error message of the
IndexingError
raise by
ndonnx.Array.__setitem__
when providing a tuple-key containing
int64-arrays is now accurate. - Using slice objects in the
ndonnx.Array.__setitem__
no longer require value propagation. ndonnx.Array.__setitem__
now correctly handles boolean masks for
arrays of two or more dimensions.- Operations between NumPy and ndonnx arrays now correctly call the
reverse dunder methods such asndonnx.Array.__radd__
where
appropriate. - Operations between
numpy.generic
andndonnx.Array
objects now
follow the regular type promotion logic. - The following dunder operations on
ndonnx.Array
now correctly return
NotImplemented
if one of the operands is not of type
numpy.ndarray | ndonnx.Array | bool | str | int | float
:__add__
,
__radd__
,__and__
,__rand__
,__floordiv__
,__rfloordiv__
,
__ge__
,__gt__
,__le__
,__lshift__
,__rlshift__
,__lt__
,
__matmul__
,__rmatmul__
,__mod__
,__rmod__
,__mul__
,
__rmul__
,__or__
,__ror__
,__pow__
,__rpow__
,__rshift__
,
__rrshift__
,__sub__
,__rsub__
,__truediv__
,__rtruediv__
,
__xor__
,__rxor__
,__eq__
,__ne__
New workarounds for missing onnxruntime implementations
ndx.any
andndx.all
now correctly propagate values even if the
input is zero-sized.ndonnx.arange
now follows NumPy's semantics for extremely large
start, stop, and step values.ndonnx.min
,ndonnx.max
,ndonnx.minimum
,ndonnx.maximum
, and
ndonnx.clip
now produce correct results for very large values in
int64 arrays.
0.13.0 (2025-05-27)
Bug fixes
ndonnx.concat
no longer raises an error ifaxis=None
, the
resulting data type isint32
orint64
, and one of the provided
arrays is zero-sized.ndonnx.__array_namespace_info__.capabilities()
now reports the
number of supported dimensions via the"max dimensions"
entry rather
than"max rank"
.- Add missing onnxruntime workaround for
uint32
inputs tondonnx.min
andndonnx.max
. - Fix array instantiation with
ndonnx.asarray
and very large Python
integers foruint64
data types. - Fix passing an Python scalar as the second argument to
ndonnx.where
. - Calling
ndonnx.roll
on zero-sized inputs no longer causes a segfault
on Linux.
New features
- The
ndonnx.TimeDelta64DType
andndonnx.DateTime64DType
gained
support for milli and microseconds as units. ndonnx.where
now promotes time units between the two branches.- Addition, multiplication, division, and subtraction between arrays
with timedelta or datetime data types now support promotion between
time units. - Comparison operations between arrays with timedelta or datetime data
types now support promotion between time units. - Added
ndonnx.__array_api_version__
reporti
0.12.0 (2025-05-15)
Bug fix
- The modulo operator (
%
) now correctly follows Python's semantics if the second argument is negative.
New features
- Support the 2024.12 version of the Array API (except
nextafter
).
0.11.0 (2025-05-08)
Bug fix
ndonnx.mean
,ndonnx.var
, andndonnx.std
now produce correct results if axes outside the range of[-1, 1]
are given.
Other change
- Address various deprecation warnings.
0.10.1 (2025-04-01)
Technical release to address a PyPI publishing issue.
0.10.0 (2025-04-01)
Breaking changes
- Removed the deprecated
ndonnx.promote_nullable
function. Usendonnx.extensions.make_nullable
instead. - The existing (private) tooling to define custom data types has been removed.
- The
ndonnx.Array.len
member function has been removed since it is neither defined bynumpy.ndarray
nor the Array-API. ndonnx.Array.size
now returnsint | None
in accordance to with the Array-API rather than andonnx.Array
instance.
Bugfixes
- The following functions now correctly take the
keepdims
argument into account:ndonnx.Array.sum
ndonnx.Array.prod
ndonnx.Array.max
ndonnx.Array.min
ndonnx.Array.all
ndonnx.Array.any
New features
- ndonnx gained partial support for
float16
data types. - The following functions are now exposed in the ndonnx namespace in accordance to the Array-API standard:
ndonnx.__array_namespace_info__
ndonnx.maximum
ndonnx.minimum
ndonnx.meshgrid
ndonnx.moveaxis
ndonnx.tile
ndonnx.unstack
ndonnx.vecdot
- The newly added :mod:
ndonnx.extensions
module exposes the following functions:ndonnx.extensions.datetime_to_year_month_day
ndonnx.extensions.fill_null
ndonnx.extensions.get_mask
ndonnx.extensions.is_float_dtype
ndonnx.extensions.is_integer_dtype
ndonnx.extensions.is_nullable_dtype
ndonnx.extensions.is_nullable_float_dtype
ndonnx.extensions.is_nullable_integer_dtype
ndonnx.extensions.is_numeric_dtype
ndonnx.extensions.is_onnx_dtype
ndonnx.extensions.is_signed_integer_dtype
ndonnx.extensions.s_time_unit
ndonnx.extensions.is_unsigned_integer_dtype
ndonnx.extensions.isin
ndonnx.extensions.make_nullable
ndonnx.extensions.put
ndonnx.extensions.shape
(deprecated in favor ofndonnx.Array.dynamic_shape
)ndonnx.extensions.static_map
- Arrays now expose the
ndonnx.Array.device
property to improve Array API compatibility. Note that serializing an ONNX model inherently postpones device placement decisions to the runtime so currently one abstract device is supported. - The
ndonnx.Array
object gained the following member functions:ndonnx.Array.disassemble
ndonnx.Array.dynamic_shape
ndonnx.Array.dynamic_size
ndonnx.Array.unwrap_numpy
ndonnx.Array.unwrap_spox
Deprecations
ndonnx.array
is deprecated in favor ofndonnx.argument
.- :mod:
ndonnx.additional
is deprecated in favor ofndonnx.extensions
. ndonnx.from_spox_var
is deprecated in favor ofndonnx.asarray
.ndonnx.Nullable
is deprecated in favor ofndonnx.extensions.is_nullable_dtype
ndonnx.NullableFloating
is deprecated in favor ofndonnx.extensions.is_nullable_float_dtype
ndonnx.NullableIntegral
is deprecated in favor ofndonnx.extensions.is_nullable_integer_dtype
ndonnx.Floating
is deprecated in favor ofndonnx.extensions.is_float_dtype
ndonnx.Integral
is deprecated in favor ofndonnx.extensions.is_integer_dtype
ndonnx.Numerical
is deprecated in favor ofndonnx.extensions.is_numeric_dtype
ndonnx.CoreType
is deprecated in favor ofndonnx.extensions.is_onnx_dtype
ndonnx.NullableCore
is deprecated in favor ofndonnx.extensions.is_nullable_dtype
ndonnx.UnsupportedOperationError
is deprecated in favor ofTypeError
ndonnx.CastError
is deprecated in favor ofTypeError
Other changes
ndonnx.additional.make_nullable
can no longer be used for custom data types.
0.9.3 (2024-10-25)
0.9.3 (2024-10-25)
- Reduced the number of unnecessary casts in
ndonnx.argmax
andndonnx.argmin
.
0.9.2 (2024-10-03)
0.9.2 (2024-10-03)
- Technical release that adds back source distribution.