STEllAR-GROUP / phylanx

An Asynchronous Distributed C++ Array Processing Toolkit
Boost Software License 1.0
75 stars 76 forks source link

Add norm() primitive #1276

Closed hkaiser closed 4 years ago

hkaiser commented 4 years ago

Fixes #1273

This implements all of the vector norms (see: https://numpy.org/doc/stable/reference/generated/numpy.linalg.norm.html) and the full corresponding API (i.e. keepdims, axis, and ord arguments). This also implements the Frobenius and L2 norms for matrices. Matrix norms don't support the axis argument.