apache/mxnet

How can I best add support for complex numbers?

Closed this issue · 2 comments

MXNet would work great as a framework for Physics simulations. Unfortunately, you don't support complex numbers!!! I would happily add support for this, assuming it isn't going to be incredibly hard.

What would be the most straightforward means of adding Complex number support?

I would say it is not easy to add complex number support. basically you need to define how to do + - * / ... for the new type ComplexNumber, and let NDArray aware of ComplexNumber. And what make it more complicated is for operators defined in mshadow, make sure the functions defined by c++ template can handle it. Also for calculation in operators, some codes cast dtype by DType(input) where DType is a template.

Close for now and feel free to reopen if you want to discuss more.