-
Notifications
You must be signed in to change notification settings - Fork 62
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
isvalid
error with PythonCall.Utils.StaticString
#254
Comments
isvalid
error with PythonCall.Utils.StaticString{UInt32, 44}isvalid
error with PythonCall.Utils.StaticString
Yeah, Supporting indexing is harder because it requires understanding UTF-8 and UTF-32 - AFAIK Julia doesn't provide much support for implementing your own string types in terms of handling the encoding (even UTF-8) except for the If you are getting these from a |
I see you have implemented indexing in the last commits, thanks, the examples in the OP now work: julia> s = PythonCall.Utils.StaticString{UInt32, 44}("ababababb")
"ababababb"
julia> s[1]
'a': ASCII/Unicode U+0061 (category Ll: Letter, lowercase)
julia> length(s)
9
julia> s[1:2]
"ab"
julia> s[1:2] |> typeof
SubString{PythonCall.Utils.StaticString{UInt32, 44}} Can we get a new release? |
Adding tests from JuliaPy#254
I decided it wasn't so hard! Sure I'll make a release this week. |
Hi, sorry to bother but it would be great to have a new release! |
Sure - done. |
When converting to
PyArray
some numpy arrays with string elements, I end up with strings of typePythonCall.Utils.StaticString{UInt32, 44}
.It seems that this type is not well supported though, and I get the following errors when indexing and computing the length:
The text was updated successfully, but these errors were encountered: