mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-28 03:41:14 +08:00

* implemented vector_norm in cpp added linalg to mlx * implemented vector_norm python binding * renamed vector_norm to norm, implemented norm without provided ord * completed the implementation of the norm * added tests * removed unused import in linalg.cpp * updated python bindings * added some tests for python bindings * handling inf, -inf as numpy does, more extensive tests of compatibility with numpy * added better docs and examples * refactored mlx.linalg.norm bindings * reused existing util for implementation of linalg.norm * more tests * fixed a bug with no ord and axis provided * removed unused imports * some style and API consistency updates to linalg norm * remove unused includes * fix python tests * fixed a bug with frobenius norm of a complex-valued matrix * complex for vector too --------- Co-authored-by: Awni Hannun <awni@apple.com>
15 lines
296 B
C
15 lines
296 B
C
// Copyright © 2023 Apple Inc.
|
|
|
|
#pragma once
|
|
|
|
#include "mlx/array.h"
|
|
#include "mlx/backend/metal/metal.h"
|
|
#include "mlx/device.h"
|
|
#include "mlx/fft.h"
|
|
#include "mlx/linalg.h"
|
|
#include "mlx/ops.h"
|
|
#include "mlx/random.h"
|
|
#include "mlx/stream.h"
|
|
#include "mlx/transforms.h"
|
|
#include "mlx/utils.h"
|