Function np

  • Parser and main namespace for the ndarray-js package.

    Parameters

    Returns any

Binary operators

add: Wrapper
bitwise_and: Wrapper
bitwise_or: Wrapper
bitwise_shift_left: Wrapper
bitwise_shift_right: Wrapper
bitwise_xor: Wrapper
divide: Wrapper
divide_int: Wrapper
equal: Wrapper
greater: Wrapper
greater_equal: Wrapper
less: Wrapper
less_equal: Wrapper
logical_and: Wrapper
logical_or: Wrapper
maximum: Wrapper
minimum: Wrapper
mod: Wrapper
multiply: Wrapper
not_equal: Wrapper
pow: Wrapper
subtract: Wrapper

Casting and reshaping

array: ((A) => NDArray<any>)

Type declaration

asarray: (<T>(A) => NDArray<T>)

Type declaration

fromlist: ((arr, dtype?) => NDArray<TypedArrayConstructor>)

Type declaration

Type declaration

reshape: ((A, shape_or_first, ...more_shape) => NDArray<TypedArrayConstructor>)

Type declaration

Constructors

arange: ((arg0, arg1?) => NDArray<TypedArrayConstructor>)

Type declaration

empty: ((shape, dtype?) => NDArray<TypedArrayConstructor>)

Type declaration

geomspace: ((start, stop, steps?, endpoint?) => NDArray<Float64ArrayConstructor> | NDArray<TypedArrayConstructor>)

Type declaration

linspace: ((start, stop, steps?, endpoint?) => NDArray<Float64ArrayConstructor>)

Type declaration

    • (start, stop, steps?, endpoint?): NDArray<Float64ArrayConstructor>
    • Parameters

      • start: number
      • stop: number
      • steps: number = 50
      • endpoint: boolean = true

      Returns NDArray<Float64ArrayConstructor>

ones: ((shape, dtype?) => NDArray<TypedArrayConstructor>)

Type declaration

zeros: ((shape, dtype?) => NDArray<TypedArrayConstructor>)

Type declaration

Elementwise operators

abs: Wrapper
acos: Wrapper
acosh: Wrapper
asin: Wrapper
asinh: Wrapper
atan: Wrapper
atanh: Wrapper
bitwise_not: Wrapper
ceil: Wrapper
cos: Wrapper
cosh: Wrapper
exp: Wrapper
floor: Wrapper
isfinite: Wrapper
isnan: Wrapper
log: Wrapper
log10: Wrapper
log1p: Wrapper
log2: Wrapper
logical_not: Wrapper
negative: Wrapper
round: Wrapper
sign: Wrapper
sin: Wrapper
sinh: Wrapper
sqrt: Wrapper
square: Wrapper
tan: Wrapper
tanh: Wrapper

Main

NDArray: typeof NDArray
modules: {
    constructors: any;
    grammar: any;
    indexing: any;
    random: any;
    statistics: any;
}

Type declaration

    Math constants

    e: number
    pi: number

    Modules

    Other

    allclose: ((A, B, rtol?, atol?, equal_nan?) => boolean)

    Type declaration

      • (A, B, rtol?, atol?, equal_nan?): boolean
      • Parameters

        • A: any
        • B: any
        • rtol: number = 1.e-5
        • atol: number = 1.e-8
        • equal_nan: boolean = false

        Returns boolean

    assign: (<T>(a, values, where) => NDArray<T>)

    Type declaration

    atan2: Wrapper
    isclose: ((A, B, rtol?, atol?, equal_nan?) => NDArray<Uint8ArrayConstructor>)

    Type declaration

      • (A, B, rtol?, atol?, equal_nan?): NDArray<Uint8ArrayConstructor>
      • Parameters

        • A: any
        • B: any
        • rtol: number = 1.e-5
        • atol: number = 1.e-8
        • equal_nan: boolean = false

        Returns NDArray<Uint8ArrayConstructor>

    nanquantile: Wrapper
    nonzero: ((a) => NDArray<Int32ArrayConstructor>[])

    Type declaration

    quantile: Wrapper
    take: ((a, indices, axis) => NDArray<Float64ArrayConstructor>)

    Type declaration

      • (a, indices, axis): NDArray<Float64ArrayConstructor>
      • Parameters

        • a: NDArray<Float64ArrayConstructor>
        • indices: NDArray<Float64ArrayConstructor>
        • axis: number

        Returns NDArray<Float64ArrayConstructor>

    where: ((condition, x, y, out?) => NDArray<Float64ArrayConstructor>)

    Type declaration

      • (condition, x, y, out?): NDArray<Float64ArrayConstructor>
      • Parameters

        • condition: NDArray<Float64ArrayConstructor>
        • x: NDArray<Float64ArrayConstructor>
        • y: NDArray<Float64ArrayConstructor>
        • out: NDArray<Float64ArrayConstructor> = null

        Returns NDArray<Float64ArrayConstructor>

    Reducers

    all: Wrapper<Uint8ArrayConstructor>
    any: Wrapper<Uint8ArrayConstructor>
    argmax: Wrapper<Int32ArrayConstructor>
    argmin: Wrapper<Int32ArrayConstructor>
    max: Wrapper<Float64ArrayConstructor>
    mean: Wrapper<Float64ArrayConstructor>
    min: Wrapper<Float64ArrayConstructor>
    norm: Wrapper
    prod: Wrapper<Float64ArrayConstructor>
    product: Wrapper<Float64ArrayConstructor>
    std: Wrapper
    sum: Wrapper<Float64ArrayConstructor>
    var: Wrapper

    Transformations

    apply_along_axis: ((arr, axis, transform, dtype?) => ArrayOrConstant)

    Type declaration

    concatenate: ((arrays, axis?) => NDArray<TypedArrayConstructor>)

    Type declaration

    sort: Wrapper
    stack: ((arrays, axis?) => NDArray<TypedArrayConstructor>)

    Type declaration

    transpose: ((arr, axes?) => NDArray<TypedArrayConstructor>)

    Type declaration

    Generated using TypeDoc