Search documentation of ash

# View Source Ash.Vector (ash v3.4.30)

A vector struct for Ash.

Implementation based off of https://github.com/pgvector/pgvector-elixir/blob/v0.2.0/lib/pgvector.ex

# Summary

## Types

t()

## Functions

from_binary(binary)

Creates a new vector from its binary representation

new(vector)

Creates a new vector from a list or tensor

to_binary(vector)

Converts the vector to its binary representation

to_list(vector)

Converts the vector to a list

# Types

Link to this type

# t()

View Source

    @type t() :: %Ash.Vector{data: binary()}

# Functions

Link to this function

# from_binary(binary)

View Source

Creates a new vector from its binary representation

Link to this function

# new(vector)

View Source

    @spec new(t() | binary() | [integer()]) :: {:ok, t()} | {:error, :invalid_vector}

Creates a new vector from a list or tensor

Link to this function

# to_binary(vector)

View Source

Converts the vector to its binary representation

Link to this function

# to_list(vector)

View Source

Converts the vector to a list