From 2dd3568e0ea90e90b39d2a46dd783051309b93cf Mon Sep 17 00:00:00 2001 From: Scott Griffiths Date: Thu, 7 Sep 2023 21:11:25 +0100 Subject: [PATCH] A few things before the point release. --- doc/array.rst | 6 ++++++ doc/index.rst | 4 ++-- release_notes.txt | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/array.rst b/doc/array.rst index 4cae8059..152148ea 100644 --- a/doc/array.rst +++ b/doc/array.rst @@ -369,6 +369,12 @@ Rule 4 ``'float16'`` ``-=`` ``'bfloat'`` → ``'float1 Comparison operators """""""""""""""""""" +Comparison operators can operate between two ``Array`` objects, or between an ``Array`` and a scalar quantity (usually a number). + +Note that they always produce an ``Array`` of :attr:`~Array.dtype` ``'bool'``, including the equality and inequality operators. + +To test the boolean equality of two Arrays use the :meth:`~Array.equals` method instead. + .. method:: Array.__eq__(self, other: int | float | str | BitsType | Array) -> Array ``a1 == a2`` diff --git a/doc/index.rst b/doc/index.rst index b1eca061..9e7e30e3 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -95,7 +95,7 @@ Arrays of bitstrings ^^^^^^^^^^^^^^^^^^^^ .. note :: - This class was introduced in version 4.1.0 of bitstring, and is a 'beta' feature that may have some small changes in future point releases. + This class was introduced in version 4.1 of bitstring, and is a 'beta' feature that may have some small changes in future point releases. If you are dealing with just one type of data but perhaps it's not one of the dozen or so supported in the ``array`` module in the standard library, then we have you covered with the :class:`Array` class. @@ -109,7 +109,7 @@ You can also easily change the data's interpretation, convert to another format, >>> a = bitstring.Array('uint16', [0, 1, 4, 6, 11, 2, 8, 7]) >>> a.data BitArray('0x0000000100040006000b000200080007') - >>> b = bitstring.Array('int5', a.tolist()) + >>> b = a.astype('uint5') >>> b.data BitArray('0x0048658907') >>> a.tolist() == b.tolist() diff --git a/release_notes.txt b/release_notes.txt index 4a2d5ce4..748ef53e 100644 --- a/release_notes.txt +++ b/release_notes.txt @@ -2,9 +2,9 @@ bitstring module version history -------------------------------- ------------------------------------ -In development: version 4.1.2 ------------------------------------ +-------------------------------------- +September 2023: version 4.1.2 released +-------------------------------------- Another maintenance release. Once again some small changes to the 'beta' Array class, plus new Array functionality.