8000 chararray.rstrip inconsistency (Trac #1200) · Issue #1798 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
chararray.rstrip inconsistency (Trac #1200) #1798
Closed
@thouis

Description

@thouis

Original ticket http://projects.scipy.org/numpy/ticket/1200 on 2009-08-19 by trac user dgoldsmith, assigned to unknown.

c = np.array([' aA '], dtype='S6').view(np.chararray); c
chararray([' aA'],
dtype='|S6')
len(c[0]) # is 'A' the trailing character...
4
c.rstrip('A') # ...or not?
chararray([' aA'],
dtype='|S6')

Note:

len(c.base[0]); c.base[0]
6
' aA '

Consequent hypothesis: rstrip is operating on c.base, not c.

len(c.base[0]); c.base[0]
6
' aA '

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0