@@ -322,14 +322,25 @@ def as_usm_ndarray(a, dtype=None, device=None, usm_type=None, sycl_queue=None):
322322 )
323323
324324
325- def check_limitations (subok = False , like = None , initial = None , where = True ):
325+ def check_limitations (
326+ subok = False ,
327+ like = None ,
328+ initial = None ,
329+ where = True ,
330+ subok_linalg = True ,
331+ signature = None ,
332+ ):
326333 """
327334 Checking limitation kwargs for their supported values.
328335
329- Parameter `subok` is only supported with default value ``False``.
336+ Parameter `subok` for array creation functions is only supported with
337+ default value ``False``.
330338 Parameter `like` is only supported with default value ``None``.
331339 Parameter `initial` is only supported with default value ``None``.
332340 Parameter `where` is only supported with default value ``True``.
341+ Parameter `subok` for linear algebra functions, named as `subok_linalg`
342+ here, and is only supported with default value ``True``.
343+ Parameter `signature` is only supported with default value ``None``.
333344
334345 Raises
335346 ------
@@ -341,22 +352,32 @@ def check_limitations(subok=False, like=None, initial=None, where=True):
341352 if like is not None :
342353 raise NotImplementedError (
343354 "Keyword argument `like` is supported only with "
344- f"default value ``None``, but got { like } "
355+ f"default value ``None``, but got { like } . "
345356 )
346357 if subok is not False :
347358 raise NotImplementedError (
348359 "Keyword argument `subok` is supported only with "
349- f"default value ``False``, but got { subok } "
360+ f"default value ``False``, but got { subok } . "
350361 )
351362 if initial is not None :
352363 raise NotImplementedError (
353364 "Keyword argument `initial` is only supported with "
354- f"default value ``None``, but got { initial } "
365+ f"default value ``None``, but got { initial } . "
355366 )
356367 if where is not True :
357368 raise NotImplementedError (
358369 "Keyword argument `where` is supported only with "
359- f"default value ``True``, but got { where } "
370+ f"default value ``True``, but got { where } ."
371+ )
372+ if not subok_linalg :
373+ raise NotImplementedError (
374+ "keyword argument `subok` is only supported with "
375+ f"default value ``True``, but got { subok_linalg } ."
376+ )
377+ if signature is not None :
378+ raise NotImplementedError (
379+ "keyword argument `signature` is only supported with "
380+ f"default value ``None``, but got { signature } ."
360381 )
361382
362383
0 commit comments