Skip to content

Commit

Permalink
Array API extra
Browse files Browse the repository at this point in the history
Merged narrow float and fill tests into test_arrays.py

Clean-up & docstrings for some more array tests

extlink "array-ref" now "xp-ref"

Correct mypy issues with test suite

Correct spelling mistakes (codespell)

Canonicalise code with shed

Added standard header to Python files

Correct mypy issues with array_api extra

Removes check_function

Draw example to exec lazy strategy in dtype sizes-as-int test

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>

Clarified builtin-finding behaviour

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>

Cover more boundary behaviour in tests

Clarify width's effect on floats() behaviour and link issue

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>

Refactor min/max checks in from_dtype()

Appropiate min/max type check in from_dtype()

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>

Added RELEASE.rst and updated AUTHORS.rst

Interface Array API extra with array helpers

"get" -> "make" namespace method, make it exclusive public method

Remove redundant axes and shapes tests (covered in tests/numpy)

Use proxies for Array API's valid_tuple_axes
  • Loading branch information
honno committed Aug 30, 2021
1 parent d8cbc06 commit 1581785
Show file tree
Hide file tree
Showing 15 changed files with 2,155 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ their individual contributions.
* `Markus Unterwaditzer <https://github.com/untitaker>`_ (markus@unterwaditzer.net)
* `Mathieu Paturel <https://github.com/math2001>`_ (mathieu.paturel@gmail.com)
* `Matt Bachmann <https://www.github.com/bachmann1234>`_ (bachmann.matt@gmail.com)
* `Matthew Barber <https://www.github.com/honno>`_ (quitesimplymatt@gmail.com)
* `Max Nordlund <https://www.github.com/maxnordlund>`_ (max.nordlund@gmail.com)
* `Maxim Kulkin <https://www.github.com/maximkulkin>`_ (maxim.kulkin@gmail.com)
* `Michel Alexandre Salim <https://github.com/michel-slm>`_ (michel@michel-slm.name)
Expand Down
7 changes: 7 additions & 0 deletions hypothesis-python/RELEASE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
RELEASE_TYPE: minor

This minor release introduces strategies for array/tensor libraries adopting the
`Array API <https://data-apis.org/>`_ standard, closing :issue:`3037`. They are
available in the `array_api` extra, working much like the existing
:doc:`strategies for NumPy <numpy>` except requiring users to specify or pass the
implementing module.
1 change: 1 addition & 0 deletions hypothesis-python/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def setup(app):
"pypi": ("https://pypi.org/project/%s/", ""),
"bpo": ("https://bugs.python.org/issue%s", "bpo-"),
"np-ref": ("https://numpy.org/doc/stable/reference/%s", ""),
"xp-ref": ("https://data-apis.org/array-api/latest/API_specification/%s", ""),
"wikipedia": ("https://en.wikipedia.org/wiki/%s", ""),
}

Expand Down
14 changes: 14 additions & 0 deletions hypothesis-python/docs/numpy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,17 @@ and confirmed working with every Pandas minor version from 0.25 through to 1.1.
Releases that are not the latest patch release of their minor version are not
tested or officially supported, but will probably also work unless you hit a
pandas bug.

---------
Array API
---------

Hypothesis offers strategies for `Array API <https://data-apis.org/>`_ adopting
libraries in the ``hypothesis.extra.array_api`` package. See :issue:`3037` for
more details.

Similar to the NumPy extra, :func:`~hypothesis.extra.array_api.arrays` is
provided to generate arrays along with other useful strategies.

.. automodule:: hypothesis.extra.array_api
:members:

0 comments on commit 1581785

Please sign in to comment.