MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/dialects/oracle/vector.py:211–226  ·  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

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

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.80

Tested by

no test coverage detected