Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

x=var('x') - getting TypeError: cannot perform reduce with flexible type

I just installed Sage 5.12 under Mac OSX 10.8. I started the notebook and then proceeded to work throughout the "Getting started" document. In Chapter One, the first page there is an example of Symbolic programming. It starts with:

x=var('x')

When I evaluate this I get the following error:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_16.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("eD12YXIoJ3gnKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/k_/vvbn4jxs6jx2z21s7xdj088c0000gq/T/tmpZ3Z0gy/___code___.py", line 2, in <module> exec compile(u"x=var('x')" + '\n', '', 'single') File "", line 1, in <module>

File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2693, in var keepdims=keepdims) File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/_methods.py", line 68, in _var arrmean = um.add.reduce(arr, axis=axis, dtype=dtype, keepdims=True) TypeError: cannot perform reduce with flexible type

DOES ANYONE KNOW WHAT IS WRONG WITH THIS. It is there own introductory example, and it is not working.

The error appears to be emanating from it won internal version of Python.

Thanks an advance for any help.

Regards.

Bob

x=var('x') - getting TypeError: cannot perform reduce with flexible type

I just installed Sage 5.12 under Mac OSX 10.8. I started the notebook and then proceeded to work throughout through the "Getting started" document. In Chapter One, the first page there is an example of Symbolic programming. It starts with:

x=var('x')

When I evaluate this I get the following error:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_16.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("eD12YXIoJ3gnKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/k_/vvbn4jxs6jx2z21s7xdj088c0000gq/T/tmpZ3Z0gy/___code___.py", line 2, in <module> exec compile(u"x=var('x')" + '\n', '', 'single') File "", line 1, in <module>

File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2693, in var keepdims=keepdims) File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/_methods.py", line 68, in _var arrmean = um.add.reduce(arr, axis=axis, dtype=dtype, keepdims=True) TypeError: cannot perform reduce with flexible type

DOES ANYONE KNOW WHAT IS WRONG WITH THIS.

It is there Sage's own introductory example, and it is not working. working! It is the fist thing I tried, so it does note give one confidence with the system.

The error appears to be emanating from it won it's own internal version of Python.

Thanks an in advance for any help.

Regards.

Bob

x=var('x') - getting TypeError: cannot perform reduce with flexible type

I just installed Sage 5.12 under Mac OSX 10.8. I started the notebook and then proceeded to work through the "Getting started" document. In Chapter One, the first page there is an example of Symbolic programming. It starts with:

x=var('x')

When I evaluate this I get the following error:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_16.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("eD12YXIoJ3gnKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/k_/vvbn4jxs6jx2z21s7xdj088c0000gq/T/tmpZ3Z0gy/___code___.py", line 2, in <module> exec compile(u"x=var('x')" + '\n', '', 'single') File "", line 1, in <module>

File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2693, in var keepdims=keepdims) File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/_methods.py", line 68, in _var arrmean = um.add.reduce(arr, axis=axis, dtype=dtype, keepdims=True) TypeError: cannot perform reduce with flexible type

DOES ANYONE KNOW WHAT IS WRONG WITH THIS. THIS?

It is Sage's own introductory example, and it is not working! It is the fist thing I tried, so it does note give one confidence with the system.

The error appears to be emanating from it's own internal version of Python.

Thanks in advance for any help.

Regards.

Bob

x=var('x') - getting TypeError: cannot perform reduce with flexible type

I just installed Sage 5.12 under Mac OSX 10.8. 10.9 (Mavericks). I started the notebook and then proceeded to work through the "Getting started" document. In Chapter One, the first page there is an example of Symbolic programming. It starts with:

x=var('x')

When I evaluate this I get the following error:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_16.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("eD12YXIoJ3gnKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/k_/vvbn4jxs6jx2z21s7xdj088c0000gq/T/tmpZ3Z0gy/___code___.py", line 2, in <module> exec compile(u"x=var('x')" + '\n', '', 'single') File "", line 1, in <module>

File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2693, in var keepdims=keepdims) File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/_methods.py", line 68, in _var arrmean = um.add.reduce(arr, axis=axis, dtype=dtype, keepdims=True) TypeError: cannot perform reduce with flexible type

DOES ANYONE KNOW WHAT IS WRONG WITH THIS?

It is Sage's own introductory example, and it is not working! It is the fist thing I tried, so it does note give one confidence with the system.

The error appears to be emanating from it's own internal version of Python.

Thanks in advance for any help.

Regards.

Bob

x=var('x') - getting TypeError: cannot perform reduce with flexible type

I just installed Sage 5.12 under Mac OSX 10.9 (Mavericks). I started the notebook and then proceeded to work through the "Getting started" document. In Chapter One, the first page there is an example of Symbolic programming. It starts with:

x=var('x')

When I evaluate this I get the following error:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_16.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("eD12YXIoJ3gnKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/k_/vvbn4jxs6jx2z21s7xdj088c0000gq/T/tmpZ3Z0gy/___code___.py", line 2, in <module> exec compile(u"x=var('x')" + '\n', '', 'single') File "", line 1, in <module>

File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2693, in var keepdims=keepdims) File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/_methods.py", line 68, in _var arrmean = um.add.reduce(arr, axis=axis, dtype=dtype, keepdims=True) TypeError: cannot perform reduce with flexible type

DOES ANYONE KNOW WHAT IS WRONG WITH THIS?

If I try this from the SAGE command line (as opposed to the notebook) it appears to work. Am I doing something fundamentally wrong by using the notebook for this?

It is Sage's own introductory example, and it is not working! It is the fist first thing I tried, so it does note not give one confidence with the system.

The error appears to be emanating from it's own internal version of Python.

Thanks in advance for any help.

Regards.

Bob

click to hide/show revision 6
No.6 Revision

x=var('x') - getting TypeError: cannot perform reduce with flexible type

I just installed Sage 5.12 under Mac OSX 10.9 (Mavericks). I started the notebook and then proceeded to work through the "Getting started" document. In Chapter One, the first page there is an example of Symbolic programming. It starts with:

x=var('x')

x=var('x')

When I evaluate this I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_16.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -- -*- coding: utf-8 --\n" -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("eD12YXIoJ3gnKQ=="),globals())+"\n"); _support_.preparse_worksheet_cell(base64.b64decode("eD12YXIoJ3gnKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

<module> File "/private/var/folders/k_/vvbn4jxs6jx2z21s7xdj088c0000gq/T/tmpZ3Z0gy/___code___.py", line 2, in <module> exec compile(u"x=var('x')" + '\n', '', 'single') File "", line 1, in <module>

<module> File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2693, in var keepdims=keepdims) File "/Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/numpy/core/_methods.py", line 68, in _var arrmean = um.add.reduce(arr, axis=axis, dtype=dtype, keepdims=True) TypeError: cannot perform reduce with flexible type

type

DOES ANYONE KNOW WHAT IS WRONG WITH THIS?

If I try this from the SAGE command line (as opposed to the notebook) it appears to work. Am I doing something fundamentally wrong by using the notebook for this?

It is Sage's own introductory example, and it is not working! It is the first thing I tried, so it does not give one confidence with the system.

The error appears to be emanating from it's own internal version of Python.

Thanks in advance for any help.

Regards.

Bob