-
Notifications
You must be signed in to change notification settings - Fork 70
Description
Hello,
Hello,
Hello, I face the new error message as below. It is usual when I work. Please let me know how to fit it.
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_2076/1343194658.py in
2
3 tessellation['stcOri'] = mm.Orientation(tessellation, verbose=False).series
----> 4 buildings['stbCeA'] = mm.CellAlignment(buildings, tessellation, 'stbOri', 'stcOri', 'uID', 'uID').series
C:\anaconda\envs\geo\lib\site-packages\momepy\distribution.py in init(self, left, right, left_orientations, right_orientations, left_unique_id, right_unique_id)
421 right_orientations = right_orientations + "_y"
422 self.series = np.absolute(comp[left_orientations] - comp[right_orientations])
--> 423 self.series.index = left.index
424
425
C:\anaconda\envs\geo\lib\site-packages\pandas\core\generic.py in setattr(self, name, value)
5498 try:
5499 object.getattribute(self, name)
-> 5500 return object.setattr(self, name, value)
5501 except AttributeError:
5502 pass
C:\anaconda\envs\geo\lib\site-packages\pandas_libs\properties.pyx in pandas._libs.properties.AxisProperty.set()
C:\anaconda\envs\geo\lib\site-packages\pandas\core\series.py in _set_axis(self, axis, labels, fastpath)
557 if not fastpath:
558 # The ensure_index call above ensures we have an Index object
--> 559 self._mgr.set_axis(axis, labels)
560
561 # ndarray compatibility
C:\anaconda\envs\geo\lib\site-packages\pandas\core\internals\managers.py in set_axis(self, axis, new_labels)
214 def set_axis(self, axis: int, new_labels: Index) -> None:
215 # Caller is responsible for ensuring we have an Index object.
--> 216 self._validate_set_axis(axis, new_labels)
217 self.axes[axis] = new_labels
218
C:\anaconda\envs\geo\lib\site-packages\pandas\core\internals\base.py in _validate_set_axis(self, axis, new_labels)
55
56 elif new_len != old_len:
---> 57 raise ValueError(
58 f"Length mismatch: Expected axis has {old_len} elements, new "
59 f"values have {new_len} elements"
ValueError: Length mismatch: Expected axis has 6405 elements, new values have 5181 elements