Support expressions of iterable types with scalar broadcasting
For example:
a = (power: 1, 2, 3) [kW]
b = (time: 2, 2, 2) [h]
print(a * 2 [h])
print(a * b)
The output is (energy: 2, 4, 6) [kilowatt * h]
(not clear how to set the name of the new Series). If the one operand is dimensionless then the name should probably keep the same.
The type check should ensure the two operands have either equal vector dimensions of some of them have dimension 1 (scalar). See this.
Also important is to enable operations with arrays, for example to compute the coordination number from the RDF:
use trapz, pi from numpy
rho = struct.natoms/cell.volume
rdf_arr = rdf:array
dist_arr = distance:array
coord_numb = 4*pi*rho*trapz(rdf_arr*dist_arr**2, dist_arr)
Edited by Ivan Kondov