My program works with
NrHorPixels=10
NrVerPixels=10
NrCellsPerPixel=16
but not with
NrHorPixels=2048
NrVerPixels=2048
NrCellsPerPixel=100
The problem is in the variable Z definition and in the meshgrid, getting
MemoryError and ValueError: dimensions too large.
Is there any solution to avoid such
I used your suggestion, but it keeps getting me those errors mentioned, but
on the definition of Z (line of the following code):
from pylab import *
import numpy as np
#VARIABLES
NrHorPixels=512
NrVerPixels=512
NrCellsPerPixel=16
GaussianCenterX=256
GaussianCenterY=256
SigmaX=1
SigmaY=1
Amplitud
Andrew P. Mullhaupt wrote:
>
>
> I came across this gem yesterday
>
>
> > >> from numpy import *
> > >> R = ones((2))
> > >> R[0] = R[0] * 1j
> > >> R
> ...array([ 0., 1.])
> > >> R = ones((2), 'complex')
> > >> R[0] = R[0] * 1j
> > >> R
>
:
File "/home/sicre/PHASES/Examples/test.py", line 18, in
XArray, YArray = np.meshgrid(XArray, YArray)
File "/usr/lib/python2.6/dist-packages/numpy/lib/function_base.py", line
2931, in meshgrid
X = x.repeat(numRows, axis=0)
ValueError: dimensions too large.
#SECOND ERR