how to deal with large numpy arrays
My problem with this code is that it creates two very large np.arrays for n = 123567101113. One for the numbers in the form x^2+1 and one for the squared primes. For the prime numbers I can maybe use sympy.nextprime(), but I don't know what to do with the nums array. Can I swap them out somehow? My idea would be to make np.array chunks and process as much as possible at the same time. a) can you store np arrays externally? Or should I put the numbers in a file? b) is it possible to process np arrays in parallel? c) the size of the numbers within the array should not necessarily be a problem, should it? d) does nextprime() or primerange() have a limit? Thank you very much! https://sololearn.com/compiler-playground/c0AJ4Fpl5dZd/?ref=app https://sololearn.com/compiler-playground/c0AJ4Fpl5dZd/?ref=app