Nim bindings for ndarray-c library
A numpy-like ndarray library for C with multi-dimensional arrays, OpenMP parallelization, and BLAS-optimized operations.
Features automatic memory management using Nim's destructors and move semantics.
Basic usage:
import ndarray
let arr = newOnes(@[2, 3])
arr.set(@[1, 2], 42.0)
let val = arr.get(@[1, 2])
arr.print("My Array", 2)
defs, cdecl, args, core, random, creation, slice, arithmetic, math, comparison, linalg, manipulation, aggregation, combining, io, properties
proc get(arr: NDArray; pos: openArray[int]): float {....raises: [ValueError],
tags: [], forbids: [].}
-
Gets the value at the specified position (int version).
Convenience overload that accepts int arrays instead of csize_t.
See also:
proc mapFn(arr: var NDArray; fn: proc (x: cdouble): cdouble {.cdecl.}): var NDArray {.
discardable, ...raises: [], tags: [], forbids: [].}
-
proc mapFnPar(arr: var NDArray;
fn: proc (a: cdouble; b: cdouble): cdouble {.cdecl.}; value: float): var NDArray {.
discardable, ...raises: [], tags: [], forbids: [].}
-
proc mapMul(arr: var NDArray; fn: proc (x: cdouble): cdouble {.cdecl.};
other: NDArray; alpha: cdouble): var NDArray {.discardable,
...raises: [], tags: [], forbids: [].}
-
proc set(arr: NDArray; pos: openArray[int]; value: float) {.
...raises: [ValueError], tags: [], forbids: [].}
-
Sets the value at the specified position (int version).
Convenience overload that accepts int arrays instead of csize_t.
See also: