You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [3]: fromDemoimportTestDoubleCastIn [4]: TestDoubleCast.PassThru(1)
Out[4]: 1.0In [5]: TestDoubleCast.PassThru(3.14159)
Out[5]: 3.14159In [6]: TestDoubleCast.PassThru(inf)
Traceback (mostrecentcalllast):
File"<ipython-input-6-b27dffdb9fe9>", line1, in<module>TestDoubleCast.PassThru(inf)
TypeError: NomethodmatchesgivenargumentsIn [7]: TestDoubleCast.PassThru(System.Double.PositiveInfinity)
Traceback (mostrecentcalllast):
File"<ipython-input-9-9828c102a734>", line1, in<module>TestDoubleCast.PassThru(System.Double.PositiveInfinity)
TypeError: NomethodmatchesgivenargumentIn [10]: System.Double(3.14159) # works as expectedOut[10]: <System.Doubleat0xaf31828>In [11]: System.Double(inf) # would like it to return a System.DoubleTraceback (mostrecentcalllast):
File"<ipython-input-11-1a15035c8521>", line1, in<module>System.Double(inf)
OverflowError: valuetoolargetoconvert
It would be very useful if the casting machinery could special case infinities so that you could create them from Python and they could be passed as arguments to methods expecting a System.Double
The text was updated successfully, but these errors were encountered:
Unless I'm mistaken there's no way to pass an infinity through to C# from Python?
It would be very useful if the casting machinery could special case infinities so that you could create them from Python and they could be passed as arguments to methods expecting a
System.Double
The text was updated successfully, but these errors were encountered: