Skip to content

Commit 0f36c81

Browse files
committed
Remove deprecated concatenate function
1 parent 7d52393 commit 0f36c81

File tree

5 files changed

+4
-21
lines changed

5 files changed

+4
-21
lines changed

bench/ndarray/concatenate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def run_benchmark(num_arrays=10, size=500, aligned_chunks=False, axis=0,
1818
dtype=np.float64, datadist="linspace", codec=blosc2.Codec.ZSTD):
1919
"""
20-
Benchmark blosc2.concatenate performance with different chunk alignments.
20+
Benchmark blosc2.concat performance with different chunk alignments.
2121
2222
Parameters:
2323
- num_arrays: Number of arrays to concatenate

doc/reference/misc.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ This page documents the miscellaneous members of the ``blosc2`` module that do n
6464
arange,
6565
asarray,
6666
concat,
67-
concatenate,
6867
copy,
6968
empty,
7069
empty_like,

src/blosc2/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ def _raise(exc):
409409
reshape,
410410
copy,
411411
concat,
412-
concatenate,
413412
expand_dims,
414413
empty,
415414
empty_like,
@@ -668,7 +667,6 @@ def _raise(exc):
668667
"compressor_list",
669668
"compute_chunks_blocks",
670669
"concat",
671-
"concatenate",
672670
"copy",
673671
"copysign",
674672
"count_nonzero",

src/blosc2/ndarray.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import inspect
1313
import math
1414
import tempfile
15-
import warnings
1615
from collections import OrderedDict, namedtuple
1716
from functools import reduce
1817
from itertools import product
@@ -5446,20 +5445,6 @@ def concat(arrays: list[NDArray], /, axis=0, **kwargs: Any) -> NDArray:
54465445
return arr1
54475446

54485447

5449-
# Previous concatenate function was renamed to concat. Keep it with a DeprecationWarning
5450-
def concatenate(arrays: list[NDArray], /, axis=0, **kwargs: Any) -> NDArray:
5451-
"""Concatenate a list of arrays along a specified axis.
5452-
5453-
This is an alias for :func:`concat`. It is kept for backward compatibility.
5454-
"""
5455-
warnings.warn(
5456-
"blosc2.concatenate is deprecated, use blosc2.concat instead.",
5457-
DeprecationWarning,
5458-
stacklevel=2,
5459-
)
5460-
return concat(arrays, axis, **kwargs)
5461-
5462-
54635448
def expand_dims(array: NDArray, axis=0) -> NDArray:
54645449
"""
54655450
Expand the shape of an array by adding new axes at the specified positions.

tests/ndarray/test_concatenate.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
import pytest
1111

1212
import blosc2
13+
from blosc2.ndarray import NUMPY_GE_2_0
1314

14-
try: # handle different versions of numpy
15+
if NUMPY_GE_2_0: # handle different versions of numpy
1516
npconcat = np.concat
16-
except AttributeError:
17+
else:
1718
npconcat = np.concatenate
1819

1920

0 commit comments

Comments
 (0)