Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 26, 2024
1 parent 27ebb03 commit 0022d04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions xarray/namedarray/_array_api/_linear_algebra_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
from typing import Any

from xarray.namedarray._array_api._utils import (
_broadcast_dims,
_get_data_namespace,
_infer_dims,
_reduce_dims,
_broadcast_dims,
)

from xarray.namedarray.core import NamedArray


Expand Down Expand Up @@ -96,8 +95,13 @@ def vecdot(
Examples
--------
>>> v = NamedArray(("y", "x"), np.array([[0., 5., 0.], [0., 0., 10.], [0., 6., 8.], [0., 6., 8.]]))
>>> n = NamedArray(("x",), np.array([0., 0.6, 0.8]))
>>> v = NamedArray(
... ("y", "x"),
... np.array(
... [[0.0, 5.0, 0.0], [0.0, 0.0, 10.0], [0.0, 6.0, 8.0], [0.0, 6.0, 8.0]]
... ),
... )
>>> n = NamedArray(("x",), np.array([0.0, 0.6, 0.8]))
>>> xdot = vecdot(v, n)
>>> xdot.dims, xdot.shape
(('y',), (4,))
Expand Down
2 changes: 1 addition & 1 deletion xarray/namedarray/_array_api/_manipulation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from xarray.namedarray._array_api._data_type_functions import result_type
from xarray.namedarray._array_api._utils import (
_atleast1d_dims,
_broadcast_dims,
_dims_from_tuple_indexing,
_dims_to_axis,
_flatten_dims,
_broadcast_dims,
_get_data_namespace,
_infer_dims,
_insert_dim,
Expand Down

0 comments on commit 0022d04

Please sign in to comment.