nmhkahn/torchsummaryX

new version of pandas needed

helion-du-mas-des-bourboux-thales opened this issue · 0 comments

Same as here numpy/numpy#18355
Fixed by python -m pip install pandas>=1.3.2

  File "<HOME>/repo.py", line 160, in __init__
    torchsummaryX.summary(model, x_rand)
  File "/usr/local/lib/python3.7/dist-packages/torchsummaryX/torchsummaryX.py", line 122, in summary
    index=['Totals']
  File "/usr/local/lib/python3.7/dist-packages/pandas/core/frame.py", line 435, in __init__
    mgr = init_dict(data, index, columns, dtype=dtype)
  File "/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py", line 254, in init_dict
    return arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
  File "/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py", line 69, in arrays_to_mgr
    arrays = _homogenize(arrays, index, dtype)
  File "/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py", line 323, in _homogenize
    val, index, dtype=dtype, copy=False, raise_cast_failure=False
  File "/usr/local/lib/python3.7/dist-packages/pandas/core/construction.py", line 465, in sanitize_array
    subarr = construct_1d_arraylike_from_scalar(value, len(index), dtype)
  File "/usr/local/lib/python3.7/dist-packages/pandas/core/dtypes/cast.py", line 1452, in construct_1d_arraylike_from_scalar
    subarr = np.empty(length, dtype=dtype)
TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type
```