@@ -322,14 +322,25 @@ def as_usm_ndarray(a, dtype=None, device=None, usm_type=None, sycl_queue=None):
322
322
)
323
323
324
324
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
+ ):
326
333
"""
327
334
Checking limitation kwargs for their supported values.
328
335
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``.
330
338
Parameter `like` is only supported with default value ``None``.
331
339
Parameter `initial` is only supported with default value ``None``.
332
340
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``.
333
344
334
345
Raises
335
346
------
@@ -341,22 +352,32 @@ def check_limitations(subok=False, like=None, initial=None, where=True):
341
352
if like is not None :
342
353
raise NotImplementedError (
343
354
"Keyword argument `like` is supported only with "
344
- f"default value ``None``, but got { like } "
355
+ f"default value ``None``, but got { like } . "
345
356
)
346
357
if subok is not False :
347
358
raise NotImplementedError (
348
359
"Keyword argument `subok` is supported only with "
349
- f"default value ``False``, but got { subok } "
360
+ f"default value ``False``, but got { subok } . "
350
361
)
351
362
if initial is not None :
352
363
raise NotImplementedError (
353
364
"Keyword argument `initial` is only supported with "
354
- f"default value ``None``, but got { initial } "
365
+ f"default value ``None``, but got { initial } . "
355
366
)
356
367
if where is not True :
357
368
raise NotImplementedError (
358
369
"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 } ."
360
381
)
361
382
362
383
0 commit comments