...
Vector literals can be written using the | character :
v = |3,6,7,9,10|
Vector data types
By default, the elements of a vector are 64-bit double precision floating point values. By calling the function vector_set_default_type(type)
, where type
can be one of 'float32'
and 'float64'
, you can force all subsequently created vectors to contain elements of that type. A vector of float32 elements consumes half the memory of a float64 vector, but at the expense of some accuracy. The type of a vector can be queried with the dtype()
function.
How operators and functions work on vectors
...
- no temporary files are generated
- computations are performed with the default of 64-bit double-precision floating point numbers
- the vector variables are held in memory
- the
values()
function on a fieldset with many fields will yield a list of many vectors, which may require much memory - if this is the end of the computation, the vector variables should be freed, e.g.
Code Block language py a = 0 b = 0 spd = 0