# vector.py
from pyvelora.core.array_base import ArrayBase
import numpy as np


class Vector(ArrayBase):

    def __init__(self, data):
        super().__init__(data)

        if self.ndim != 1:
            raise ValueError("Vector must be 1D")

    def dot(self, other):
        return np.dot(self.data, self._unwrap(other))
    
    def cross(self, other):
        return Vector(np.cross(self.data, self._unwrap(other)))