Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased¶
Added¶
inf
andnan
functions to create floating-point objects initialized to infinity or NaN.
Fixed¶
Bug in
APyFloat
addition/substraction when the exponent difference was larger than 64, introduced in v0.3.0.Bug in
from_float
when creating anAPyFloat
from anAPyFixed
.ones_like
andzeros_like
now supportAPyCFixedArray
input.Bug in
APyCFixedArray.rdiv
word-length evaluation.Bug in
APyFloat
addition when operands are of different formats and both are exactly equal to zero.
Changed¶
Removed¶
0.3.0 - 2025-03-23¶
Added¶
In
arange
, the array type can be deduced from its arguments if no bit-specifiers are given.Added optional parameter for
bias
in array creation functions that were missing it.Added
APyFloatArray.from_bits
to create floating-point arrays from bit patterns.It is now possible to assign parts of arrays as
APyFixedArray.__setitem__
andAPyFloatArray.__setitem__
has been added.fx
andfp
functions to create fixed-point and floating-point objects of correct type (scalar or array) depending on argument.fn
utility function to easily evaluate functions with APy-classes and get a result with the same format.New complex-valued data types:
APyCFixed
, a scalar fixed-point complex type.APyCFixedArray
, an array fixed-point complex type.
APyFloatArray.convolve
now supports accumulator contexts.VHDL code generation for ROMs.
It is possible to perform arithmetic with Numpy arrays, automatically converting the Numpy array to an APyArray of the same size and type as the APyArray argument.
from_float
now accepts APyTypes scalars.Wheels for Python 3.13.
copy
-method added for the array and scalar classes. This also includes support for the Pythoncopy.copy
andcopy.deepcopy
functions.Single limb abs and negation now use SIMD instructions.
Integer powers of
APyFixed
.Fixed-point multiplication, including matrix multiplication, is faster for single limb arguments resulting in a two-limb result.
Support for unary plus:
+X
,__pos__
.Support for logic not:
~X
,__invert__
.
Fixed¶
APyTypes contexts now supports multi-threading.
Incorrect fixed-point quantization in
RND_INF
andRND_MIN_INF
when source has multiple of 64 bits.Incorrect fixed-point rounding in
APyFixedArray.from_array
on Windows.Incorrect LaTeX-representation of negative fixed-point scalars.
Incorrect casting of large integers in
APyFixedArray.from_*
.Incorrect accumulation in
APyFixedArray.cumsum()
andAPyCFixedArray.cumsum()
when result has more limbs than source.Crash in
sum
,cumsum
,prod
, andcumprod
for empty arrays.Fixed-point to floating-point conversion properly rounds to
+-inf
.
Changed¶
Removed¶
Mini-GMP is no longer used. Instead, a local multi-precision integer library written in C++ is used.
Support for Python 3.9.
0.2.2 - 2024-10-03¶
Fixed¶
Fix nanobind interaction with cocotb.
0.2.1 - 2024-09-19¶
Fixed¶
Memory-access bug in
APyFloatArray.cumsum
.Bug where
APyFixedArray
multiplicative methods could give wrong result for multi-limb products if the right-hand side have longer word-length than the left-hand side.Memory leak in nanobind wrapper library.
Correct subnormal conversions between
APyFixed(Array)
andfloat
.Improved
arange
. It now handles quantization accurately and does not allow infinity and NaN as inputs.
Changed¶
Updated nanobind from v2.0.0 to v2.1.0.
0.2.0 - 2024-09-13¶
Added¶
Added methods
next_up()
andnext_down()
for floating-point scalars.Broadcasting support as NumPy.
APyFixedArray.broadcast_to()
APyFloatArray.broadcast_to()
Automatic broadcasting on array arithmetic
Support arithmetic between APyTypes classes and Python’s built-in floats and ints.
Support for automatic stub generation added.
Docstrings are made compatible with doctest, which is run in the CI.
Linting using ruff is added to pre-commit and CI.
Array manipulation and mathematical functions added:
squeeze()
reshape()
flatten() / ravel()
convolve()
sum()
cumsum()
nansum()
nancumsum()
prod()
cumprod()
nanprod()
nancumprod()
moveaxis()
swapaxis()
expand_dims()
max()
min()
nanmax()
nanmin()
Array creation functions added:
arange()
eye()
identity()
ones()
ones_like()
zeros()
zeros_like()
full()
full_like()
Added
to_bits()
to array types.Significantly improved indexing of arrays.
Added support for higher dimensions (ndim > 2) in
transpose()
.
Changed¶
Fixed¶
Smaller fixes in quantization for floating-point scalar multiplication.
Fix in floating-point
cast
-method when result became subnormal.Fix bug in
APyFixedArray.__truediv__()
where program crashes on long-limb zero denominators.Fix bug where single-dimensional tuple representations missed out on a comma.
Fix bug in comparison between floating-point infinity and fixed-point numbers.
Start uploading source distributions of APyTypes to PyPI on releases.
Fixed bug where
APyFixedArray.from_array()
initialized the wrong stored value from floating-point values that are too small for its representation. (#487)No longer consider zero a subnormal number.
Removed¶
0.1.0 - 2024-05-15¶
Initial release.