Pycharm Warning TypeError: type numpy.ndarray doesn’t define round method
1.the problem
matrix = round(np.array([[1.5,2.3],[1,2],[1,2]]))
The error interface
type is wrong: the type numpy.ndarray does not define the __round__ method
2.solve
Change the round method to np.round
code show as below:
matrix = np.round(np.array([[1.5,2.3],[1,2],[1,2]]))
Read More:
- How to Solve TypeError: type numpy.ndarray doesn’t define __round__ method
- TypeError: unsupported format string passed to numpy.ndarray.__format__
- How to Solve Angular Error: error NG8002: Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘input‘.
- How to Solve Error: Element ‘dependency’ cannot have character [children], because the type’s content type is element-
- [Solved] The method getContextPath() from the type HttpServletRequest refers to the missing type String
- How to Solve Excel Error Log 2: Sloving method
- How to Solve skimage.metrics.compare_psnr Method Error
- How to Solve Error: Type mismatch: cannot convert from Object to Car
- [Solved] TypeError: super(type, obj): obj must be an instance or subtype of type
- [Solved] harbor Error: because it doesn‘t contain any IP SANs
- How to Solve Error Swift 4 Expression type ‘@value CGRect’ is ambiguous without more context
- [Solved] unknown error: DevToolsActivePort file doesn‘t exis
- How to Solve Error: Android java.lang.IllegalStateException: Could not execute method of the activity
- How to Solve Springboot Error: Failed to convert value of type
- Numpy.exp Function Error ‘Float’ object has no attribute ‘exp’
- How to Solve Android Studio run main() Method Error
- How to Solve Error: Missing type map configuration or unsupported mapping
- [Go] Solve the empty interface interface{} cannot use (type []string) as type []interface {}
- How to Solve Docker Error: elasticsearch exception: type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];