Length-1 arrays can be converted to python scalars error? python
- by Randy
from numpy import *
from pylab import *
from math import *
def LogisticMap(a,x):
return 4.*a*x*(1.-x)
def CosineMap(a,x):
return a*cos(x/(2.*pi))
def TentMap(a,x):
if x>= 0 or x<0.5:
return 2.*a*x
if x>=0.5 or x<=1.:
return 2.*a*(1.-x)
a = 0.98
N = 40
xaxis = arange(0.0,N,1.0)
Func = CosineMap
…