On Sunday, 22 May 2016 17:26:51 UTC+10, Sayth Renshaw wrote:
> I am doing a passage in a book that was written for python 2 i am writing
> everything in 3.
>
> This is the author Ivan Idris code to show time difference between python and
> numpy arrays. The only edit I made was to fix the print
Sayth Renshaw wrote:
Read carefully:
> Run from the command line as follows
>
> python vectorsum.py n
>
> where n is an integer that specifies the size of the vectors.
So to run the script with Python 3 you could do
$ python3 vectorsum.py 42
in the shell. This implicitly sets sys.argv[1]
On Sun, 22 May 2016 05:26 pm, Sayth Renshaw wrote:
> I am doing a passage in a book that was written for python 2 i am writing
> everything in 3.
[...]
> However when I run this I get a valuerror. So either something has changed
> with int or datetime I cannot google a consistent answer.
Neither
On Sun, May 22, 2016 at 5:26 PM, Sayth Renshaw wrote:
> However when I run this I get a valuerror. So either something has changed
> with int or datetime I cannot google a consistent answer.
>
>
> ---
> ValueError
I am doing a passage in a book that was written for python 2 i am writing
everything in 3.
This is the author Ivan Idris code to show time difference between python and
numpy arrays. The only edit I made was to fix the print statements.
#!/usr/bin/env/python
import sys
from datetime import dat