Fork me on GitHub

src/arraymancer/tensor/private/p_checks

  Source Edit

Procs

func check_axis_index(t: AnyTensor; axis, index, len: Natural) {.inline.}
  Source Edit
func check_concat(t1, t2: Tensor; axis: int) {.inline.}
  Source Edit
func check_contiguous_index(t: Tensor; idx: int) {.inline.}
  Source Edit
func check_dot_prod(a, b: AnyTensor) {.inline.}
  Source Edit
proc check_elementwise[T, U](a: ClTensor[T]; b: ClTensor[U]) {.noSideEffect,
    inline.}
Check if element-wise operations can be applied to 2 Tensors   Source Edit
proc check_elementwise[T, U](a: CudaTensor[T]; b: CudaTensor[U]) {.noSideEffect,
    inline.}
Check if element-wise operations can be applied to 2 Tensors   Source Edit
func check_elementwise[T, U](a: Tensor[T]; b: Tensor[U]) {.inline.}
Check if element-wise operations can be applied to 2 Tensors   Source Edit
func check_index(t: Tensor; idx: varargs[int]) {.inline.}
  Source Edit
func check_matmat(a, b: AnyTensor) {.inline.}
  Source Edit
func check_matvec(a, b: AnyTensor) {.inline.}
  Source Edit
func check_nested_elements(shape: Metadata; len: int) {.inline, ...raises: [],
    tags: [], forbids: [].}
Compare the detected shape from flatten with the real length of the data Input: -- A shape (sequence of int) -- A length (int)   Source Edit
func check_reshape(t: AnyTensor; new_shape: Metadata) {.inline.}
  Source Edit
func check_reshape(t: AnyTensor; new_shape: varargs[int]) {.inline.}
  Source Edit
func check_shape(a: Tensor; b: Tensor | openArray;
                 relaxed_rank1_check: static[bool] = false) {.inline.}
Compare shape   Source Edit
func check_size[T, U](a: Tensor[T]; b: Tensor[U]) {.inline.}
Check if the total number of elements match   Source Edit
func check_squeezeAxis(t: AnyTensor; axis: int) {.inline.}
  Source Edit
func check_start_end(a, b: int; dim_size: int) {.inline, ...raises: [], tags: [],
    forbids: [].}
  Source Edit
func check_steps(a, b, step: int) {.inline, ...raises: [], tags: [], forbids: [].}
Though it might be convenient to automatically step in the correct direction like in Python I choose not to do it as this might introduce the typical silent bugs typechecking/Nim is helping avoid.   Source Edit
func check_unsqueezeAxis(t: AnyTensor; axis: int) {.inline.}
  Source Edit
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood