[sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Bertrand Cayzac
Hello, The code below worked happlily each time I launched it in SageMathCell until recently. It now exits with the error below in a call to scipy.optimize.newton while I didn't make any change; I gathered that the casting rules have changed but it seems that ufunc doesn't take a "casting" a

Re: [sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Vincent Delecroix
Dear Bertrand, Where is "the code below"? Vincent Le 16/02/2020 à 15:44, Bertrand Cayzac a écrit : Hello, The code below worked happlily each time I launched it in SageMathCell until recently. It now exits with the error below in a call to scipy.optimize.newton while I didn't make any change;

[sage-support] Re: Jupiter Server fails to start on macOS Catalina

2020-02-16 Thread Jinsong Xu
I have the same problem and log as Martin. After giving Sage Full Disk Access as well as using xattr and sudo, it still does work. Is there any other way to launch it? On Tuesday, January 7, 2020 at 6:14:45 AM UTC+8, Eric Martin wrote: > > I did not have ~/.sage. Removed org.sagemath.Sage.plist,

Re: [sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Bertrand Cayzac
Dear Vincent, Sorry I did not paste it...Here it goes. You'll also find it in attachment. It is to be noted that I just ran the code again after a lo,g while and it now exits upon a "print" instruction instruction supposedly in line 33. My guess is that the code is more and more compatible with t

Re: [sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Vincent Delecroix
As a start you can notice that SageMath cell has switch to Python 3. To see that, run the following two lines in a cell import sys print(sys.version) In particular you need to modify the print statements from print whatever to print(whatever) The change from Python 2 to Python 3 impacts more

Re: [sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Vincent Delecroix
It seems that sympy is picky about the input. You can use the following workaround. Replace son = scipy.optimize.newton(f, xstart, df, maxiter= iter) By f2 = lambda s: float(f(s)) xstart2 = float(xstart) df2 = lambda s: float(df(s)) son = scipy.optimize.newton(f2, xstart2, df2, maxiter= iter)

Re: [sage-support] Re: Jupiter Server fails to start on macOS Catalina

2020-02-16 Thread Dima Pasechnik
maybe trying the terminal version: http://www.mirrorservice.org/sites/www.sagemath.org/osx/intel/sage-9.0-OSX_10.15.2-x86_64.tar.bz2 is a better idea. After the installation, one can run, in terminal, in the place where you have it installed, ./sage -n to launch Jupyter On Sun, Feb 16, 2020 at