@@ -233,7 +233,7 @@ independently of values or shapes.
233
233
* - ``__pow__ `` and ``__rpow__ `` do not do value-based casting for 0-D
234
234
arrays.
235
235
- **Breaking **
236
- - For example, ``np.array(0., dtype=float32)*np.array(0.,
236
+ - For example, ``np.array(0., dtype=float32)** np.array(0.,
237
237
dtype=float64) `` is ``float32 ``. Note that this is value-based casting
238
238
on 0-D arrays, not scalars.
239
239
* - No cross-kind casting.
@@ -534,11 +534,13 @@ Array Object Differences
534
534
- Type
535
535
- Notes
536
536
* - No array scalars
537
- - ???
538
- - The spec does not have array scalars, only 0-D arrays. It is not clear
539
- if NumPy's scalars deviate from the spec 0-D array behavior in any ways
540
- other than the ones outlined in
541
- :ref: `array_api-type-promotion-differences `.
537
+ - **Strictness **
538
+ - The spec does not have array scalars, only 0-D arrays. However, other
539
+ than the promotion differ
FF35
ences outlined in
540
+ :ref: `array_api-type-promotion-differences `, scalars duck type as 0-D
541
+ arrays for the purposes of the spec. The are immutable, but the spec
542
+ `does not require mutability
543
+ <https://data-apis.org/array-api/latest/design_topics/copies_views_and_mutation.html> `__.
542
544
* - ``bool() ``, ``int() ``, and ``float() `` only work on 0-D arrays.
543
545
- **Strictness **
544
546
- See https://github.com/numpy/numpy/issues/10404.
@@ -627,7 +629,8 @@ Linear Algebra Differences
627
629
-
628
630
* - ``diagonal `` operates on the last two axes.
629
631
- **Breaking **
630
- -
632
+ - Strictly speaking this can be **compatible ** because ``diagonal `` is
633
+ moved to the ``linalg `` namespace.
631
634
* - ``eigh ``, ``qr ``, ``slogdet `` and ``svd `` return a named tuple.
632
635
- **Compatible **
633
636
- The corresponding ``numpy `` functions return a ``tuple ``, with the
@@ -637,7 +640,7 @@ Linear Algebra Differences
637
640
- The ``norm `` function has been omitted from the array API and split
638
641
into ``matrix_norm `` for matrix norms and ``vector_norm `` for vector
639
642
norms. Note that ``vector_norm `` supports any number of axes, whereas
640
- ``np.norm `` only supports a single axis for vector norms.
643
+ ``np.linalg. norm `` only supports a single axis for vector norms.
641
644
* - ``matrix_rank `` has an ``rtol `` keyword argument instead of ``tol ``.
642
645
- **Compatible **
643
646
- In the array API, ``rtol `` filters singular values smaller than
@@ -698,7 +701,7 @@ Manipulation Functions Differences
698
701
- No cross-kind casting. No value-based casting on scalars.
699
702
* - ``stack `` has different default casting rules from ``np.stack ``
700
703
- **Strictness **
701
- - No cross-kind casting. No value-based casting on scalars.
704
+ - No cross-kind casting.
702
705
* - New function ``permute_dims ``.
703
706
- **Compatible **
704
707
- Unlike ``np.transpose ``, the ``axis `` keyword argument to
0 commit comments