You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add argument check_dims to assert_allclose to allow transposed inputs (#5733) (#8991)
* Add argument check_dims to assert_allclose to allow transposed inputs
* Update whats-new.rst
* Add `check_dims` argument to assert_equal and assert_identical + tests
* Assert that dimensions match before transposing or comparing values
* Add docstring for check_dims to assert_equal and assert_identical
* Update doc/whats-new.rst
Co-authored-by: Tom Nicholas <[email protected]>
* Undo fat finger
Co-authored-by: Tom Nicholas <[email protected]>
* Add attribution to whats-new.rst
* Replace check_dims with bool argument check_dim_order, rename align_dims to maybe_transpose_dims
* Remove left-over half-made test
* Remove check_dim_order argument from assert_identical
* assert_allclose/equal: emit full diff if dimensions don't match
* Rename check_dim_order test, test Dataset with different dim orders
* Update whats-new.rst
* Hide maybe_transpose_dims from Pytest traceback
Co-authored-by: Maximilian Roos <[email protected]>
* Ignore mypy error due to missing functools.partial.__name__
---------
Co-authored-by: Tom Nicholas <[email protected]>
Co-authored-by: Maximilian Roos <[email protected]>
Copy file name to clipboardExpand all lines: doc/whats-new.rst
+2
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@ New Features
29
29
for example, will retain the object. However, one cannot do operations that are not possible on the `ExtensionArray`
30
30
then, such as broadcasting.
31
31
By `Ilan Gold <https://github.com/ilan-gold>`_.
32
+
- :py:func:`testing.assert_allclose`/:py:func:`testing.assert_equal` now accept a new argument `check_dims="transpose"`, controlling whether a transposed array is considered equal. (:issue:`5733`, :pull:`8991`)
33
+
By `Ignacio Martinez Vazquez <https://github.com/ignamv>`_.
32
34
- Added the option to avoid automatically creating 1D pandas indexes in :py:meth:`Dataset.expand_dims()`, by passing the new kwarg
33
35
`create_index=False`. (:pull:`8960`)
34
36
By `Tom Nicholas <https://github.com/TomNicholas>`_.
0 commit comments