package nx

  1. Overview
  2. Docs

Module Bigarray_ext.Array1Source

include module type of struct include Bigarray.Array1 end
Sourcetype (!'a, !'b, !'c) t = ('a, 'b, 'c) Bigarray.Array1.t

The type of one-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

Sourceval dim : ('a, 'b, 'c) t -> int

Return the size (dimension) of the given one-dimensional Bigarray.

Sourceval layout : ('a, 'b, 'c) t -> 'c Bigarray.layout

Return the layout of the given Bigarray.

Sourceval change_layout : ('a, 'b, 'c) t -> 'd Bigarray.layout -> ('a, 'b, 'd) t

Array1.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimension as a). No copying of elements is involved: the new array and the original array share the same storage space.

  • since 4.06
Sourceval size_in_bytes : ('a, 'b, 'c) t -> int

size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

  • since 4.03
Sourceval sub : ('a, 'b, 'c) t -> int -> int -> ('a, 'b, 'c) t

Extract a sub-array of the given one-dimensional Bigarray. See Genarray.sub_left for more details.

Sourceval slice : ('a, 'b, 'c) t -> int -> ('a, 'b, 'c) Bigarray.Array0.t

Extract a scalar (zero-dimensional slice) of the given one-dimensional Bigarray. The integer parameter is the index of the scalar to extract. See Bigarray.Genarray.slice_left and Bigarray.Genarray.slice_right for more details.

  • since 4.05
Sourceval create : 'a 'b 'c. ('a, 'b) kind -> 'c layout -> int -> ('a, 'b, 'c) t
Sourceval kind : 'a 'b 'c. ('a, 'b, 'c) t -> ('a, 'b) kind
Sourceval get : ('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a
Sourceval set : ('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a -> unit
Sourceval unsafe_get : ('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a
Sourceval unsafe_set : ('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a -> unit
Sourceval nx_ba_blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit
Sourceval blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit
Sourceval nx_ba_fill : ('a, 'b, 'c) t -> 'a -> unit
Sourceval fill : ('a, 'b, 'c) t -> 'a -> unit
Sourceval init : ('a, 'b) kind -> 't layout -> int -> (int -> 'a) -> ('a, 'b, 't) t
Sourceval of_array : ('a, 'b) kind -> 't layout -> 'a array -> ('a, 'b, 't) t