You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case that happened due to some NaN within the entity effect, which lead to negative values (-1) in the ids.
In my opinion, both the properties entity_ids and time_ids should return an error if the elements in the index contains some NaN (since I had a quite hard time figuring it out).
2d array containing time ids corresponding dataframe view
"""
index=self.index
returnnp.asarray(index.codes[1])[:, None]
If necessary, I would be happy to work on that.
The text was updated successfully, but these errors were encountered:
NauelSerraino
changed the title
panel_structure_stats() returns a generic numpy error if ids are negativepanel_structure_stats() returns a generic numpy error if ids are negative
Jul 16, 2024
The function
np.bincount(ids)
returns a genericValueError: 'list' argument must have no negative elements
.linearmodels/linearmodels/panel/model.py
Lines 97 to 102 in 9288df3
In my case that happened due to some
NaN
within the entity effect, which lead to negative values (-1
) in theids
.In my opinion, both the properties
entity_ids
andtime_ids
should return an error if the elements in the index contains someNaN
(since I had a quite hard time figuring it out).linearmodels/linearmodels/panel/data.py
Lines 365 to 389 in 9288df3
If necessary, I would be happy to work on that.
The text was updated successfully, but these errors were encountered: