@@ -2004,7 +2004,7 @@ def format_to_string(format):
2004
2004
raise ValueError (f"invalid format: { format } " )
2005
2005
2006
2006
2007
- def asarray (obj , / , * , dtype = None , format = "coo" , backend = "pydata" , device = None , copy = False ):
2007
+ def asarray (obj , / , * , dtype = None , format = "coo" , device = None , copy = False ):
2008
2008
"""
2009
2009
Convert the input to a sparse array.
2010
2010
@@ -2016,8 +2016,6 @@ def asarray(obj, /, *, dtype=None, format="coo", backend="pydata", device=None,
2016
2016
Output array data type.
2017
2017
format : str, optional
2018
2018
Output array sparse format.
2019
- backend : str, optional
2020
- Backend for the output array.
2021
2019
device : str, optional
2022
2020
Device on which to place the created array.
2023
2021
copy : bool, optional
@@ -2038,18 +2036,12 @@ def asarray(obj, /, *, dtype=None, format="coo", backend="pydata", device=None,
2038
2036
if format not in {"coo" , "dok" , "gcxs" }:
2039
2037
raise ValueError (f"{ format } format not supported." )
2040
2038
2041
- if backend not in {"pydata" , "taco" }:
2042
- raise ValueError (f"{ backend } backend not supported." )
2043
-
2044
2039
from ._compressed import GCXS
2045
2040
from ._coo import COO
2046
2041
from ._dok import DOK
2047
2042
2048
2043
format_dict = {"coo" : COO , "dok" : DOK , "gcxs" : GCXS }
2049
2044
2050
- if backend == "taco" :
2051
- raise ValueError ("Taco not yet supported." )
2052
-
2053
2045
if isinstance (obj , (COO , DOK , GCXS )):
2054
2046
return obj .asformat (format )
2055
2047
0 commit comments