def METHOD_NAME(self, other, axis=0):
    if other.ndim != 1:
        raise ValueError("all the input arrays must have same number of dimensions")
    try:
        other = naked(other)
    except TypeError:
        return NotImplemented
    if issparse(other):
        xps = get_sparse_module(self.spmatrix)
        if axis != 0:
            raise ValueError("axis can only be 0")
        other = other.reshape(1, other.shape[0]) if other.shape[0] != 1 else other
        x = xps.hstack((self.spmatrix.reshape(1, self.shape[0]), other))
    else:
        xp = get_array_module(self.spmatrix)
        x = xp.METHOD_NAME(
            (self.spmatrix.toarray().reshape(self.shape), other), axis=axis
        )
    if issparse(x):
        return SparseNDArray(x, shape=(x.shape[1],))
    return get_array_module(x).asarray(x)