Re: [Tutor] anomaly

2018-04-20 Thread Peter Otten
Alan Gauld via Tutor wrote: > On 20/04/18 05:53, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote: >> I have a situation in which the same code gives an error in idle but >> works in qtconsole >> regards, >> >> *​in idle* >> v = np.zeros(len(x)) >> >> for i in range(len(x)): >> if x[i] < 1.0: >>

Re: [Tutor] anomaly

2018-04-20 Thread Alan Gauld via Tutor
On 20/04/18 05:53, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote: > I have a situation in which the same code gives an error in idle but works > in qtconsole > regards, > > *​in idle* > v = np.zeros(len(x)) > > for i in range(len(x)): > if x[i] < 1.0: > v[i] = 0 You don't give us any clue to

Re: [Tutor] anomaly

2018-04-20 Thread Steven D'Aprano
On Fri, Apr 20, 2018 at 10:23:37AM +0530, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote: > I have a situation in which the same code gives an error in idle but works > in qtconsole Probably different versions of Python running. What does this say in each of them? import sys print (sys.version) print

[Tutor] anomaly

2018-04-19 Thread D . V . N . Sarma డి . వి . ఎన్ . శర్మ
I have a situation in which the same code gives an error in idle but works in qtconsole regards, *​in idle* v = np.zeros(len(x)) for i in range(len(x)): if x[i] < 1.0: v[i] = 0 else: v[i] = V print v​ RESTART: C:\Users\SHARMA\Documents\Python Scripts\sqwell.py