Skip to content

Commit

Permalink
Hack to ignore dtype in doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-T-McCann committed May 4, 2022
1 parent 6a4eb0c commit 1c26651
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/blockarray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ appropriate. For example,
>>> x.shape # returns tuple
((2, 3), (3,))

>>> x * 2 # returns BlockArray
>>> x * 2 # returns BlockArray # doctest: +ELLIPSIS
[DeviceArray([[ 2, 6, 14],
[ 4, 4, 2]], dtype=int32), DeviceArray([ 4, 8, 16], dtype=int32)]
[ 4, 4, 2]], dtype=...), DeviceArray([ 4, 8, 16], dtype=...)]

>>> y = snp.blockarray((
... [[.2],
... [.3]],
... [.4]
... ))

>>> x + y # returns BlockArray
>>> x + y # returns BlockArray # doctest: +ELLIPSIS
[DeviceArray([[1.2, 3.2, 7.2],
[2.3, 2.3, 1.3]], dtype=float32), DeviceArray([2.4, 4.4, 8.4], dtype=float32)]
[2.3, 2.3, 1.3]], dtype=...), DeviceArray([2.4, 4.4, 8.4], dtype=...)]


.. _numpy_functions_blockarray:
Expand Down

0 comments on commit 1c26651

Please sign in to comment.