matplotlib - Issue with inverting sparse matrix pylab -



matplotlib - Issue with inverting sparse matrix pylab -

i seek following

from scipy import * numpy import * import scipy s import numpy np import math import scipy.sparse l plot import graph3dsolution import numpy.linalg lin currentsol=s.sparse.linalg.inv(i-c)*a*lastsol

im missing out code issue this

traceback (most recent phone call last): file "explict1wave.py", line 62, in <module> currentsol=s.sparse.linalg.inv(i-c)*a*lastsol attributeerror: 'module' object has no attribute 'linalg' python 2.7.6 |anaconda 1.9.1 (x86_64)| (default, jan 10 2014, 11:23:15) [gcc 4.0.1 (apple inc. build 5493)] on darwin type "help", "copyright", "credits" or "license" more information. im>>> import scipy >>> scipy.__version__ '0.14.0' >>>

i documentation , seems these libraries existed since .12 . dont know issue is, im sure simple im not seeing.

>>> import scipy s >>> s.sparse traceback (most recent phone call last): file "<stdin>", line 1, in <module> attributeerror: 'module' object has no attribute 'sparse' >>> >>> scipy.sparse import linalg >>> linalg.inv <function inv @ 0x19b1758> >>>

general recommendations importing functions scipy .

on side note, best avoid star imports. these from scipy import *, from numpy import * not recommended , not needed here. same import scipy s.

matplotlib scipy

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -