In QuantLib's C++ API, Array multiplied by Array returns an array with element-wise product. However, in SWIG (used for Python and R), Array multiplied by Array returns dot product instead. It looks like it has been like this for a very long time, so I'm not sure if we can change this, but this is very unfortunate. Standard Python libraries like numpy also use * for element-wise product.
In QuantLib's C++ API, Array multiplied by Array returns an array with element-wise product. However, in SWIG (used for Python and R), Array multiplied by Array returns dot product instead. It looks like it has been like this for a very long time, so I'm not sure if we can change this, but this is very unfortunate. Standard Python libraries like numpy also use
*
for element-wise product.