+ 1
please how can I write a list that contains numbers (-infinity to infinity) in python language.
eg: list= [-infinity, infinity]
6 Réponses
+ 5
import math
x = [-math.inf, math.inf]
+ 3
you cannot make a list with infinitive items inside...
but you could make a generator wich will yield items infinitively, since you define absolute start and step...
+ 2
There is no general maximum array size in numpy. In your case, arange uses int64 bits, which means it is 16 times more, or around 43 GB. a 32 bits process can only access around 4 GB of memory
+ 2
The program will run out of resources if it was possible.
+ 1
Hmmmm okay
+ 1
You simply cant, try ring buffer instead, It will give that feel :)