Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ _is_empty_2d
Function
_is_empty_2d
numpy/linalg/linalg.py:220–222 ·
view source on GitHub ↗
(arr)
Source
from the content-addressed store, hash-verified
218
raise
LinAlgError(
"Array must not contain infs or NaNs"
)
219
220
def
_is_empty_2d(arr):
221
# check size first for efficiency
222
return
arr.size == 0 and prod(arr.shape[-2:]) == 0
223
224
225
def
transpose(a):
Callers
2
cond
Function · 0.85
pinv
Function · 0.85
Calls
1
prod
Function · 0.90
Tested by
no test coverage detected