Menu

Commit [r23604]  Maximize  Restore  History

Created the lib.compat.norm() compatibility function for numpy.linalg.norm().

For numpy 1.8 and higher, the numpy.linalg.norm() function has introduced the 'axis' argument. This
is an incredibly fast way of determining the norm of an array of vectors. This is used by the frame
order analysis.

However for older numpy versions, this causes the frame order analysis, and many corresponding
system and GUI tests to fail. Therefore this new lib.compat.norm() function has been designed to
default to numpy.linalg.norm() if the axis argument is supported, or to switch to the much slower
numpy.apply_along_axis(numpy.linalg.norm, axis, x) call which is supported by older numpy.

bugman 2014-05-29

changed /trunk/lib/compat.py
/trunk/lib/compat.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.