Using the error statistics that appear in Python

Source: Internet
Author: User

1, unsupported operand type (s) for/: ' Map ' and ' int '

Machine Learning Practical PCA Program

Traceback (most recent):   " <ipython-input-29-808c65c1265e> "  in <module>    lowdmat,reconmat=pca.pca (datamat,1)  "i:\ python\pca\pca.py" in PCA    = mean (Datamat, axis=0)

Workaround:

2, Typeerror:ufunc ' isNaN ' not supported for the input types, and the inputs could not being safely coerced to any supported Types according to the casting rule ' safe '

Traceback (most recent): File"<ipython-input-17-945c872e5152>", Line 1,inch<module>Datamat=Pca.replacenanwithmean () File"I:\python\PCA\pca.py", line 59,inchReplacenanwithmean Meanval= Mean (Datmat[nonzero (~isNaN (Datmat[:,i]. A)) [0],i]) Typeerror:ufunc'isNaN'  notSupported forThe input types, andThe inputs could notBe
Safely coerced to any supported types according to the casting rule"'Safe"'

Using the error statistics that appear in Python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.