diff --git a/README.md b/README.md index 2992bdcb0..dd493d7ee 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Import the `galois` package in Python. In [1]: import galois In [2]: galois.__version__ -Out[2]: '0.1.1' +Out[2]: '0.1.2' ``` ### Create a [`FieldArray`](https://mhostetter.github.io/galois/latest/api/galois.FieldArray/) subclass diff --git a/docs/index.rst b/docs/index.rst index c6fb3932f..6334125e1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -140,6 +140,7 @@ If this library was useful to you in your research, please cite us. Following th :hidden: release-notes/versioning.rst + release-notes/v0.1.2.md release-notes/v0.1.1.md release-notes/v0.1.0.md release-notes/v0.0.33.md diff --git a/docs/release-notes/v0.1.2.md b/docs/release-notes/v0.1.2.md new file mode 100644 index 000000000..0aa14c333 --- /dev/null +++ b/docs/release-notes/v0.1.2.md @@ -0,0 +1,81 @@ +# v0.1.2 + +*Released November 9, 2022* + +## Changes + +- Fixed major inefficiency when dividing an array by a scalar or smaller (broadcasted) array. ([#429](https://github.com/mhostetter/galois/pull/429)) + ```ipython + In [1]: import galois + + In [2]: GF = galois.GF(31**5) + + In [3]: x = GF.Random(10_000, seed=1); x + Out[3]: + GF([13546990, 14653018, 21619804, ..., 15507037, 24669161, 19116362], + order=31^5) + + In [4]: y = GF.Random(1, seed=2); y + Out[4]: GF([23979074], order=31^5) + + # v0.1.1 + In [5]: %timeit x / y + 261 ms ± 5.67 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) + + # v0.1.2 + In [5]: %timeit x / y + 8.23 ms ± 51 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) + ``` +- Optimized [`lagrange_poly()`](https://mhostetter.github.io/galois/v0.1.2/api/galois.lagrange_poly/) by adding a custom JIT-compilable routine. ([#432](https://github.com/mhostetter/galois/pull/432)) + ```ipython + In [1]: import galois + + In [2]: GF = galois.GF(13693) + + In [3]: x = GF.Random(100, seed=1) + + In [4]: y = GF.Random(100, seed=2) + + # v0.1.1 + In [5]: %timeit galois.lagrange_poly(x, y) + 2.85 s ± 3.25 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) + + # v0.1.2 + In [5]: %timeit galois.lagrange_poly(x, y) + 4.77 ms ± 190 µs per loop (mean ± std. dev. of 7 runs, 1 loop each) + ``` +- Added ability in [`FieldArray.row_reduce()`](https://mhostetter.github.io/galois/v0.1.2/api/galois.FieldArray.row_reduce/) to solve for an identity matrix on the right side of a matrix using the `eye` keyword argument. ([#426](https://github.com/mhostetter/galois/pull/426)) + ```python + >>> import galois + >>> GF = galois.GF(31) + >>> A = GF([[16, 12, 1, 25], [1, 10, 27, 29], [1, 0, 3, 19]]) + >>> A.row_reduce() + GF([[ 1, 0, 0, 11], + [ 0, 1, 0, 7], + [ 0, 0, 1, 13]], order=31) + >>> A.row_reduce(eye="right") + GF([[ 5, 1, 0, 0], + [27, 0, 1, 0], + [17, 0, 0, 1]], order=31) + ``` +- Removed comma separators in [`FieldArray.__str__()`](https://mhostetter.github.io/galois/v0.1.2/api/galois.FieldArray.__str__/) to be consistent with NumPy's use of `str()` and `repr()`. ([#432](https://github.com/mhostetter/galois/pull/432)) + ```python + >>> import galois + >>> GF = galois.GF(3**5, display="power") + >>> x = GF.Random((3, 4), seed=1) + >>> x + GF([[α^185, α^193, α^49, α^231], + [ α^81, α^60, α^5, α^41], + [ α^50, α^161, α^151, α^171]], order=3^5) + >>> print(x) + [[α^185 α^193 α^49 α^231] + [ α^81 α^60 α^5 α^41] + [ α^50 α^161 α^151 α^171]] + ``` +- Modernized type annotations to use abbreviated notation. For example, `a | b` instead of `Union[a, b]`. ([#418](https://github.com/mhostetter/galois/pull/418)) +- Added `Self` type annotation where appropriate. ([#420](https://github.com/mhostetter/galois/pull/420)) +- Updated documentation and improved examples. ([#424](https://github.com/mhostetter/galois/pull/424), [#430](https://github.com/mhostetter/galois/pull/430)) + +## Contributors + +- Matt Hostetter ([@mhostetter](https://github.com/mhostetter))