News

Therefore, since ndim is 1 this is a 1-dimensional array. The shape method returns a python tuple of length 1 - this tells us the array is 1D and has 4 entries. The size method also tells us the array ...
ValueError: Expected 2D array, got 1D array instead: array=[]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single ...
Figure 1: A 1D array of degenerate cavities for simulating a 2D rectangular lattice in a magnetic field. (a) The optical design for simulating .