numexy v0.1.1 Numexy

Documentation for Numexy.

Link to this section Summary

Functions

Calculate inner product

New matrix

Create ones matrix or vector

Calculate transpose matrix

Create zeros matrix or vector

Link to this section Functions

Link to this function dot(array1, array2)

Calculate inner product.

Examples

iex> x = Numexy.new([1,2,3])
%Array{array: [1,2,3], shape: {3, nil}}
iex> y = Numexy.new([1,2,3])
%Array{array: [1,2,3], shape: {3, nil}}
iex> Numexy.dot(x, y)
14

New matrix.

Examples

iex> Numexy.new([1,2,3])
%Array{array: [1, 2, 3], shape: {3, nil}}
iex> Numexy.new([[1,2,3],[1,2,3]])
%Array{array: [[1, 2, 3], [1, 2, 3]], shape: {2, 3}}

Create ones matrix or vector.

Examples

iex> Numexy.ones({2, 3})
%Array{array: [[1, 1, 1], [1, 1, 1]], shape: {2, 3}}
iex> Numexy.ones({3, nil})
%Array{array: [1, 1, 1], shape: {3, nil}}
Link to this function transpose(array)

Calculate transpose matrix.

Examples

iex> x = Numexy.new([[4,3],[7,5],[2,7]])
%Array{array: [[4, 3], [7, 5], [2, 7]], shape: {3, 2}}
iex> Numexy.transpose(x)
%Array{array: [[4, 7, 2], [3, 5, 7]], shape: {2, 3}}

Create zeros matrix or vector.

Examples

iex> Numexy.zeros({2, 3})
%Array{array: [[0, 0, 0], [0, 0, 0]], shape: {2, 3}}
iex> Numexy.zeros({3, nil})
%Array{array: [0, 0, 0], shape: {3, nil}}