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

BUG: read-only buffer failures in datetime parsing #34857

Closed
jorisvandenbossche opened this issue Jun 18, 2020 · 1 comment · Fixed by #37613
Closed

BUG: read-only buffer failures in datetime parsing #34857

jorisvandenbossche opened this issue Jun 18, 2020 · 1 comment · Fixed by #37613
Labels
Milestone

Comments

@jorisvandenbossche
Copy link
Member

PR #22147 caused several "read-only buffer" errors (latest: #34843). I quickly skimmed that PR, and most changes there have been fixed in the mean-time (either converted back to use ndarray or added const), a few are remaining, like:

array_strptime (and also array_to_timedelta64 -> to_timedelta)

In [4]: arr = np.array(['15/10/2020'], dtype=object) 

In [5]: arr.flags.writeable = False   

In [6]: pd.to_datetime(arr, format="%d/%m/%Y")    
...
ValueError: buffer source array is read-only

and then a few in parsing.pyx, but I suppose those are generally not a problem, if the arrays are coming from out parsing code, they will never be read-only.

Originally posted by @jorisvandenbossche in #34843 (comment)

@jbrockmendel
Copy link
Member

I think this is going to come up anywhere we have object[:] as an argument type

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 a pull request may close this issue.

3 participants