Skip to content

DOC: fix doctests in pca.py for newer NumPy output format#5301

Open
Kd1880 wants to merge 2 commits intoMDAnalysis:developfrom
Kd1880:fix/doctest-pca
Open

DOC: fix doctests in pca.py for newer NumPy output format#5301
Kd1880 wants to merge 2 commits intoMDAnalysis:developfrom
Kd1880:fix/doctest-pca

Conversation

@Kd1880
Copy link

@Kd1880 Kd1880 commented Mar 11, 2026

Fixes part of #3925

Changes made in this Pull Request:

  • Removed incorrect >>> from .. testsetup:: blocks in pca.py
  • Updated expected doctest outputs for newer NumPy which returns np.float64(x) instead of x

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes
(Claude by Anthropic was used to help identify and understand the fixes. Actual code changes were made manually.)

PR Checklist

  • Issue raised/referenced?
  • Tests updated/added? (documentation-only change, no new tests needed)
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS?
  • LLM/AI disclosure was updated.

Developers Certificate of Origin

I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.


📚 Documentation preview 📚: https://mdanalysis--5301.org.readthedocs.build/en/5301/

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (9531c6e) to head (394b382).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5301   +/-   ##
========================================
  Coverage    93.82%   93.83%           
========================================
  Files          182      182           
  Lines        22483    22483           
  Branches      3195     3195           
========================================
+ Hits         21095    21096    +1     
+ Misses         925      924    -1     
  Partials       463      463           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant