Hi everyone. This is my first post on this forum and I am relatively new to Tensorflow. As per the title, my overall goal is to generalize a function that works with regular numpy arrays to a function that works with tensors. The long term goal is to use this function as part of a custom loss function but that is a different topic.

From my own debugging sessions, I think my issue is that I do not know how to write the form exp^{ix} . Using numpy, I could do something like: np.exp(1j*x), where x is an array of reals. When I tried to do something similar for tensors, I get an error: TypeError: Cannot convert 1j to EagerTensor of dtype double.

Any comments and help is greatly appreciated! Thanks for your time.

PS: I tried to attach a Jupyter Notebook containing the code I am working with but it seems I am not allowed to do so. Whatâ€™s the best way to share my code and any relevant files needed to run it?