Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: array is too big; arr.size * arr.dtype.itemsize is larger than the maximum possible size. #52

Closed
FarshidShekari opened this issue Jan 4, 2019 · 3 comments

Comments

@FarshidShekari
Copy link

FarshidShekari commented Jan 4, 2019

When I want to read gctx file. Is fixable?

File "C:/Users/Farshid/PycharmProjects/DGEP/gctx2npy.py", line 13, in main
   gctobj = parse.parse(GTEx_GCTX)
 File "C:\Users\Farshid\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cmapPy\pandasGEXpress\parse.py", line 68, in parse
   make_multiindex=make_multiindex)
 File "C:\Users\Farshid\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cmapPy\pandasGEXpress\parse_gctx.py", line 110, in parse
   data_df = parse_data_df(data_dset, sorted_ridx, sorted_cidx, row_meta, col_meta)
 File "C:\Users\Farshid\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cmapPy\pandasGEXpress\parse_gctx.py", line 332, in parse_data_df
   data_array = np.empty(data_dset.shape, dtype=np.float32)
ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.
Traceback (most recent call last):
 File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.2\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 382, in _on_run
   r = self.sock.recv(1024)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
@oena
Copy link
Contributor

oena commented Jan 4, 2019

Hi @FarshidShekari, given your error message this seems like a connectivity or firewall issue, not an issue with cmapPy; if you google your error message, there seem to be a number of suggestions on how to approach this issue.

@oena oena closed this as completed Jan 4, 2019
@FarshidShekari
Copy link
Author

I set permission to Pycharm but it raises the error:
ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.

File "C:/Users/Farshid/PycharmProjects/DGEP/gctx2npy.py", line 13, in main
   gctobj = parse.parse(GTEx_GCTX)
 File "C:\Users\Farshid\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cmapPy\pandasGEXpress\parse.py", line 68, in parse
   make_multiindex=make_multiindex)
 File "C:\Users\Farshid\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cmapPy\pandasGEXpress\parse_gctx.py", line 110, in parse
   data_df = parse_data_df(data_dset, sorted_ridx, sorted_cidx, row_meta, col_meta)
 File "C:\Users\Farshid\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cmapPy\pandasGEXpress\parse_gctx.py", line 332, in parse_data_df
   data_array = np.empty(data_dset.shape, dtype=np.float32)
ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.
Traceback (most recent call last):
 File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.2\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 382, in _on_run
   r = self.sock.recv(1024)

@oena
Copy link
Contributor

oena commented Jan 7, 2019

Hi Farshid, it looks like your file is too large to read into memory on whatever setup you're using. Probably a better approach would be to use hyperslab selection to only read in portions of the file; the cmapPy tutorial has an example of how to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants