Skip to content

Commit 5bd29ad

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 16cbe86 commit 5bd29ad

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

sparse/_coo/common.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,8 +1283,8 @@ def sort(x, /, *, axis=-1, descending=False):
12831283
12841284
"""
12851285

1286-
from .core import COO
12871286
from .._common import moveaxis
1287+
from .core import COO
12881288

12891289
x = _validate_coo_input(x)
12901290

@@ -1297,9 +1297,7 @@ def sort(x, /, *, axis=-1, descending=False):
12971297
x_shape = x.shape
12981298
x = x.reshape((-1, x_shape[-1]))
12991299

1300-
new_coords, new_data = _sort_coo(
1301-
x.coords, x.data, x.fill_value, sort_axis_len=x_shape[-1], descending=descending
1302-
)
1300+
new_coords, new_data = _sort_coo(x.coords, x.data, x.fill_value, sort_axis_len=x_shape[-1], descending=descending)
13031301

13041302
x = COO(new_coords, new_data, x.shape, has_duplicates=False, sorted=True, fill_value=x.fill_value)
13051303

sparse/tests/test_coo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,6 @@ def test_sort(arr, fill_value, axis, descending):
18181818
@pytest.mark.parametrize("fill_value", [-1, 0, 1])
18191819
@pytest.mark.parametrize("descending", [False, True])
18201820
def test_sort_only_fill_value(fill_value, descending):
1821-
18221821
arr = np.full((3, 3), fill_value=fill_value)
18231822
s_arr = sparse.COO.from_numpy(arr, fill_value)
18241823

0 commit comments

Comments
 (0)