Skip to content

BUG: fix and clarify cdouble and clongdouble constructors - #32795

Open
gregwb wants to merge 1 commit into
numpy:mainfrom
gregwb:complex-docstring-update
Open

gregwb wants to merge 1 commit into
numpy:mainfrom
gregwb:complex-docstring-update

Conversation

@gregwb

@gregwb gregwb commented Sep 26, 2026

Copy link
Copy Markdown

PR summary

(I also considered whether the clongdouble implementation should be fixed instead, but I see from code here and associated PR that it may not be so simple)

First time contributor introduction

Hello! I'm Greg, engineer at Bloomberg participating in the NumFOCUS Sustaining Open Source Series.
I've used numpy at work mainly for stats and timeseries calculations, relating to software systems telemetry.

AI Disclosure

I used OpenAI Codex used to help inspect and explain to me the relevant parts of the codebase, and to draft the documentation string edits and PR description.

I reviewed the changes and will participate in the PR manually.

Clarify that cdouble, unlike Python complex, does not
accept keyword arguments.

Document clongdouble as accepting one positional value, matching its
implementation.
Comment on lines +190 to +191
Unlike Python :class:`complex`, this constructor does not accept keyword
arguments.

@Aniketsy Aniketsy Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about passing something like this to be just more informative. ( its upto you, you're verion is alredy fine)

Unlike Python :class:`complex`, ``real`` and ``imag`` must be passed positionally;
keyword arguments are not accepted.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I like that! I’ll update the PR

@Aniketsy Aniketsy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregwb thanks for the PR 😊 changes looks good 👍

also please update PR title starting with DOC ... instead of BUG

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants