Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Expose void-scalar "base" attribute in python #8153

Merged
merged 1 commit into from
Oct 14, 2016

Conversation

ahaldane
Copy link
Member

This is a minor oversight I noticed a while ago: void scalars to not expose their base attribute correctly in python, eg

>>> a = np.zeros(3, dtype='i4,f4')
>>> b = a[0]
>>> b.base
None

This has been a mild annoyance for me when debugging a couple time in the past.

Fixed here.

Py_INCREF(Py_None);
return Py_None;
}
else{
Copy link
Member

Choose a reason for hiding this comment

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

Space after else.

static PyObject *
voidtype_base_get(PyVoidScalarObject *self)
{
if(self->base == NULL){
Copy link
Member

Choose a reason for hiding this comment

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

Space after if and before {.

@charris
Copy link
Member

charris commented Oct 13, 2016

LGTM modulo some c style nits.

@ahaldane
Copy link
Member Author

All right, fixed the style issues.

@charris charris merged commit ee41e9d into numpy:master Oct 14, 2016
@charris
Copy link
Member

charris commented Oct 14, 2016

Thanks Allan.

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

Successfully merging this pull request may close these issues.

None yet

2 participants