@@ -828,10 +828,13 @@ def test_diagonal(shape, chunkshape, offset):
828828)
829829@pytest .mark .parametrize (
830830 "dtype" ,
831- ["bool" , " int32" , "int64" , "float32" , "float64" , "complex128" ],
831+ ["int32" , "int64" , "float32" , "float64" , "complex128" ],
832832)
833- def test_linalgproxy (xp , dtype ):
834- dtype_ = getattr (xp , dtype ) if hasattr (xp , dtype ) else np .dtype (dtype )
833+ def test_linalgproxy (xp , dtype ): # noqa : C901
834+ try :
835+ dtype_ = getattr (xp , dtype )
836+ except AttributeError :
837+ dtype_ = np .dtype (dtype )
835838 for name in linalg_funcs :
836839 if name == "transpose" :
837840 continue # deprecated
@@ -853,7 +856,17 @@ def test_linalgproxy(xp, dtype):
853856 # Check this works
854857 argspec = inspect .getfullargspec (func )
855858 num_args = len (argspec .args )
856- npfunc = blosc2 .linalg .nptranspose if name == "permute_dims" else getattr (np , name )
859+ # handle numpy 1.26
860+ if name == "permute_dims" :
861+ npfunc = blosc2 .linalg .nptranspose
862+ elif name == "concat" and not hasattr (np , "concat" ):
863+ npfunc = np .concatenate
864+ elif name == "matrix_transpose" :
865+ npfunc = blosc2 .linalg .nptranspose
866+ elif name == "vecdot" :
867+ npfunc = blosc2 .linalg .npvecdot
868+ else :
869+ npfunc = getattr (np , name )
857870 if num_args > 2 or name in ("outer" , "matmul" ):
858871 try :
859872 lexpr = func (blosc_matrix , foreign_matrix )
0 commit comments