У меня есть этот сеанс на SymPy Live :
Python console for SymPy 1.4 (Python 2.7.12)
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
Warning: this shell runs with SymPy 1.4 and so examples pulled from
other documentation may provide unexpected results.
Documentation can be found at http://docs.sympy.org/1.4.
>>> import numpy as np
>>> V = np.array([[1, y, x, 1], [y, 1, z, 1], [x, z, 1, 1]])
>>> V = np.array([[1, y, x, 1], [y, 1, z, 1], [x, z, 1, 1]])
Exception in SymPy Live of type
<type 'exceptions.ValueError'>
for reference the last 5 stack trace entries are
Traceback (most recent call last):
File "/base/data/home/apps/s~sympy-live-hrd/57.417397408462217066/shell.py", line 781, in post
live.evaluate(statement, session, printer, stream)
File "/base/data/home/apps/s~sympy-live-hrd/57.417397408462217066/shell.py", line 453, in evaluate
if name not in old_globals or val != old_globals[name]:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Второе назначение V
идентично первому, но во второй раз SymPy выдает исключение.
Я сделал что-то не так, и если да, какую часть документации я пропустил?