fix: properly create new vectors from strings

This commit is contained in:
Zach Daniel 2023-11-26 18:53:23 -05:00
parent 71e6c8bd7b
commit 83d5bdd55e

View file

@ -11,7 +11,7 @@ defmodule Ash.Vector do
Creates a new vector from a list or tensor
"""
def new(binary) when is_binary(binary) do
from_binary(binary)
new(:erlang.binary_to_list(binary))
end
def new(%__MODULE__{} = vector), do: {:ok, vector}