pyccel / sympde

Symbolic calculus for partial differential equations (and variational forms)
http://sympde.readthedocs.io/
MIT License
20 stars 4 forks source link

obscure error message for dot product of scalar functions #96

Open campospinto opened 3 years ago

campospinto commented 3 years ago

When I write

u, v = elements_of(V0, names='u, v')
expr   = dot(u,v)

with a scalar-valued space V0 I get the following error message:

File "/Users/campos/Work/codes/sympde/sympde/calculus/core.py", line 302, in __new__
    a = reduce(mul, args_1)
TypeError: reduce() of empty sequence with no initial value

which is not very clear. Either dot products should be defined for scalar valued functions (why not), or the message should be clearer