Vector functions
C/C++
Python
- ska_sdp_func.examples.vector_add(input_a, input_b, output)
Simple example to add two vectors, element_wise.
Parameters can be either numpy or cupy arrays, but must all be consistent, and with the same length and data type. Computation is performed either on the CPU or GPU as appropriate.
- Parameters:
input_a (numpy.ndarray or cupy.ndarray) – First input vector.
input_b (numpy.ndarray or cupy.ndarray) – Second input vector.
output (numpy.ndarray or cupy.ndarray) – Output vector.