Arctan2 in Theano

You shouldn’t try to use the same code for theano and numpy operations. Theano can sometimes recognize and override a numpy function call as you observed but this is not always done consistently and shouldn’t really be relied upon.

You can always make two versions, one which uses theano operators and another that uses numpy ones. You can also compile a theano expression if you want to use it to evaluate numbers as you would with a numpy function.

1 Like