machinevision-toolbox-python
machinevision-toolbox-python copied to clipboard
module 'numpy' has no attribute 'bool'.
Errors in books are a nightmare for the readers and the author! If you spot something that is wrong, or something could be improved (clearer, less confusing, less ambiguous) please log it here. This will help fellow readers of the book, and will improve future editions of the book.
Where is the error? The command matches.subset(100).plot("w") seems to be causing an error while you were running the code from the README.
What is the error? A clear and concise description of how you would like to see the text changed, and why.
Additional context machinevisiontoolbox/ImagePointFeatures.py:1239, in FeatureMatch.getitem(self, i) 1237 inliers = self._inliers[i] 1238 elif isinstance(i, np.ndarray): -> 1239 if np.issubdtype(i.dtype, np.bool): 1240 matches = [m for m, g in zip(self._matches, i) if g] 1241 if self._inliers is not None:
Additional context
Hello, Professor. I am a student from China. The issue is that numpy deprecated np.bool in version 1.20 and recommends using bool or np.bool_ instead. Please review the relevant code in this aspect. 你好教授,我是来自中国的学生 这个问题是numpy在1.20版本就弃用了np.bool,需要使用bool或者np.bool_替代。 请检查一下这个方面的相关代码
this is an issue with the machine vision toolbox, not an error with the book.
what version of MVTB are you using? I cannot find these lines anywhere in the current code base.