MCPcopy Create free account
hub / github.com/ml-explore/mlx / init_constants

Function init_constants

python/src/constants.cpp:8–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace nb = nanobind;
7
8void init_constants(nb::module_& m) {
9 m.attr("e") = 2.71828182845904523536028747135266249775724709369995;
10 m.attr("euler_gamma") = 0.5772156649015328606065120900824024310421;
11 m.attr("inf") = std::numeric_limits<double>::infinity();
12 m.attr("nan") = NAN;
13 m.attr("newaxis") = nb::none();
14 m.attr("pi") = 3.1415926535897932384626433;
15}

Callers 1

NB_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected