mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
PyCharm Tables] PY-33448 PyCharm freezes with large objects in SciView #PY-33448 Fixed
* Fixed also the Python Console case: transposed 1-Dim table there as well (cherry picked from commit a6c783dc38aa3c5050a836c36d8a76e8b3cbda19) GitOrigin-RevId: b7fe92925fe8702ffd80e56a4fe0c313c6411372
This commit is contained in:
committed by
intellij-monorepo-bot
parent
53d3243005
commit
050782b5ea
@@ -456,20 +456,11 @@ def array_to_meta_thrift_struct(array, name, format):
|
|||||||
# http://stackoverflow.com/questions/16837946/numpy-a-2-rows-1-column-file-loadtxt-returns-1row-2-columns
|
# http://stackoverflow.com/questions/16837946/numpy-a-2-rows-1-column-file-loadtxt-returns-1row-2-columns
|
||||||
# explanation: http://stackoverflow.com/questions/15165170/how-do-i-maintain-row-column-orientation-of-vectors-in-numpy?rq=1
|
# explanation: http://stackoverflow.com/questions/15165170/how-do-i-maintain-row-column-orientation-of-vectors-in-numpy?rq=1
|
||||||
# we use kind of a hack - get information about memory from C_CONTIGUOUS
|
# we use kind of a hack - get information about memory from C_CONTIGUOUS
|
||||||
is_row = array.flags['C_CONTIGUOUS']
|
cols = 1
|
||||||
|
rows = len(array)
|
||||||
if is_row:
|
if rows < len(array):
|
||||||
rows = 1
|
reslice = '[0:%s]' % (rows)
|
||||||
cols = len(array)
|
array = array[0:rows]
|
||||||
if cols < len(array):
|
|
||||||
reslice = '[0:%s]' % (cols)
|
|
||||||
array = array[0:cols]
|
|
||||||
else:
|
|
||||||
cols = 1
|
|
||||||
rows = len(array)
|
|
||||||
if rows < len(array):
|
|
||||||
reslice = '[0:%s]' % (rows)
|
|
||||||
array = array[0:rows]
|
|
||||||
elif l == 2:
|
elif l == 2:
|
||||||
rows = array.shape[-2]
|
rows = array.shape[-2]
|
||||||
cols = array.shape[-1]
|
cols = array.shape[-1]
|
||||||
|
|||||||
Reference in New Issue
Block a user