0

I have a list like :

print x
>>> [1, 1, 1, 1, 3]
>>> [25, 375, 25, 100, 425]
>>> [17742.05, 17742.0, 17738.1, 17738.05, 17738.0]
>>> [17744.0, 17744.6, 17744.65, 17744.95, 17745.0]
>>> [475, 25, 50, 25, 650]
>>> [3, 1, 2, 1, 4]

but when i convert it to a numpy array , it prints out like this (can i use some datatype to make is appear just as the list).

y=np.asarray(x)
>>> [[  1.00000000e+00   1.00000000e+00   1.00000000e+00   1.00000000e+00
3.00000000e+00]
>>> [  2.50000000e+01   3.75000000e+02   2.50000000e+01   1.00000000e+02
4.25000000e+02]
>>>  [  1.77420500e+04   1.77420000e+04   1.77381000e+04   1.77380500e+04
1.77380000e+04]
>>>  [  1.77440000e+04   1.77446000e+04   1.77446500e+04   1.77449500e+04
1.77450000e+04]
>>>  [  4.75000000e+02   2.50000000e+01   5.00000000e+01   2.50000000e+01
6.50000000e+02]
>>> [  3.00000000e+00   1.00000000e+00   2.00000000e+00   1.00000000e+00
4.00000000e+00]]

As these values change every second , can i have some way to transfer this array into an bigger array(for larger time frame), something like appending a list to another list.

2
  • but what about the values like "17742.05" in the list , wont using dtype = int round these off ? Commented Jun 3, 2015 at 8:22
  • using dtype = float , gives the same output as above Commented Jun 3, 2015 at 8:28

1 Answer 1

2

Try turning off the scientific notation in numpy.

numpy.set_printoptions(suppress=True)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.