MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/dialects/oracle/vector.py:210–225  ·  view source on GitHub ↗
(
        self,
        num_dimensions: int,
        indices: Union[list, array.array],
        values: Union[list, array.array],
    )

Source from the content-addressed store, hash-verified

208 """
209
210 def __init__(
211 self,
212 num_dimensions: int,
213 indices: Union[list, array.array],
214 values: Union[list, array.array],
215 ):
216 if not isinstance(indices, array.array) or indices.typecode != "I":
217 indices = array.array("I", indices)
218 if not isinstance(values, array.array):
219 values = array.array("d", values)
220 if len(indices) != len(values):
221 raise TypeError("indices and values must be of the same length!")
222
223 self.num_dimensions = num_dimensions
224 self.indices = indices
225 self.values = values
226
227 def __str__(self):
228 return (

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.80

Tested by

no test coverage detected