On 11/05/17 20:46, Stephen P. Molnar wrote:
>> script uses the np.savetxt() quite a few times, but one use generates
>> the title error. The offending line is np.savetxt(name_s,I_z) where I_z
>> is a single number of type float64 with a size of 1.
I'm glad you found the problem but please, when
On 05/11/2017 02:26 PM, Stephen P. Molnar wrote:
0
down vote
favorite
I am using Spyder3.1.4 with Python 3.6.0 | Anaconda 4.3.0 (64-bit) | and
IPython 6.0.0.
My script is rather long and calculates a series of molecular indices
using the same formula and a series of different coefficients.
0
down vote
favorite
I am using Spyder3.1.4 with Python 3.6.0 | Anaconda 4.3.0 (64-bit) | and
IPython 6.0.0.
My script is rather long and calculates a series of molecular indices
using the same formula and a series of different coefficients. The
script uses the np.savetxt() quite
Thank you all I finally understood that the while code traps j and runs
independently of the for loop until while is false and a new i is picked.
On Thu, May 11, 2017 at 10:19 AM Abdur-Rahmaan Janhangeer <
arj.pyt...@gmail.com> wrote:
> sorry j is set to zero. grave typo
>
> Abdur-Rahmaan
2017-05-11 3:53 GMT+02:00 Rafael Skovron :
> Sorry I left out the indents in my previous email. It seems like j is
> always reset to zero. Why does j vary?
>
> Are there two different instances of j going on?
>
>
> for i in range(1, 5):
>
> j=0
>
>while j < i:
>
>
sorry j is set to zero. grave typo
Abdur-Rahmaan Janhangeer,
Mauritius
https://abdurrahmaanjanhangeer.wordpress.com
On 11 May 2017 12:29 pm, "Abdur-Rahmaan Janhangeer"
wrote:
>
>
> -- Forwarded message --
> From: "Abdur-Rahmaan Janhangeer"
-- Forwarded message --
From: "Abdur-Rahmaan Janhangeer"
Date: 11 May 2017 12:26 pm
Subject: Re: [Tutor] While Loop Question
To: "Rafael Skovron"
Cc:
i modified your code to make it look like that :
for i in range(1, 5):
j=0
On Wed, May 10, 2017 at 06:53:21PM -0700, Rafael Skovron wrote:
> Sorry I left out the indents in my previous email. It seems like j is
> always reset to zero. Why does j vary?
Because you run code that adds 1 to j.
> Are there two different instances of j going on?
No. Try to run the code in
On 11/05/17 02:50, Rafael Skovron wrote:
> I dont understand why j can have any value other than zero in this:
>
> for i in range(1, 5):
j = 0
while j < i:
print(j, end = " ")
j += 1
Because i can go as high as 4 (from range(1,5)->1,2,3,4).
So lets consider that
I dont understand why j can have any value other than zero in this:
for i in range(1, 5):
j = 0
while j < i:
print(j, end = " ")
j += 1
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
10 matches
Mail list logo