MCPcopy Create free account
hub / github.com/numpy/numpy / _mac_os_check

Function _mac_os_check

numpy/__init__.py:377–388  ·  view source on GitHub ↗

Quick Sanity check for Mac OS look for accelerate build bugs. Testing numpy polyfit calls init_dgelsd(LAPACK)

()

Source from the content-addressed store, hash-verified

375 del _sanity_check
376
377 def _mac_os_check():
378 """
379 Quick Sanity check for Mac OS look for accelerate build bugs.
380 Testing numpy polyfit calls init_dgelsd(LAPACK)
381 """
382 try:
383 c = array([3., 2., 1.])
384 x = linspace(0, 2, 5)
385 y = polyval(c, x)
386 _ = polyfit(x, y, 2, cov=True)
387 except ValueError:
388 pass
389
390 if sys.platform == "darwin":
391 from . import exceptions

Callers 1

__init__.pyFile · 0.85

Calls 4

arrayFunction · 0.50
linspaceFunction · 0.50
polyvalFunction · 0.50
polyfitFunction · 0.50

Tested by

no test coverage detected