Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Warning against a deprecated function

When programming the following code

def varelmat(M) :
    return sum((vector(M)).apply_map((x-(sum(vector(M)))/len(vector(M)))^2))/len(vector(M))

and applying it

B= random_matrix(QQ, 7,7)
varelmat(B)

I end with the following warning

`/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/repl/ipython_kernel/__main__.py:3: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...) See http://trac.sagemath.org/5930 for details. IPKernelApp.launch_instance(kernel_class=SageKernel'

Could some one explain me how to keep my code save ?