module Ollama::Utils::Math

def convert_to_vector(vector)

Other tags:
    Example: Convert an array to a Numo NArray -

Returns:
  • (Numo::NArray) - The converted NArray, or the original if it's already a Numo NArray.

Parameters:
  • vector (Array) -- The input array to be converted.
def convert_to_vector(vector)
  vector.is_a?(Numo::NArray) and return vector
  Numo::NArray[*vector]
end