Skip to content

Conversation

@chrishavlin
Copy link
Contributor

Fix for failing test in #200

@chrishavlin chrishavlin added bug Something isn't working infrastructure Related to CI, versioning, websites, organizational issues, etc code_improvements refactors, rewrites, performance improvements labels Jun 17, 2025
@chrishavlin
Copy link
Contributor Author

huh, ok, need to understand more about why decode was being used there in the first place...

@chrishavlin
Copy link
Contributor Author

with python 3.11 and np 2.3.0: the following call

name, size, gl_type = GL.glGetActiveUniform(self.program, i)
gl_type = num_to_const[gl_type]
self.uniforms[name.decode("utf-8")] = (size, gl_type)

has started return a numpy array for name for some reason. previously, it was a byte string. e.g., for i=0, and np<2.3.0,

print((type(name), name, size, gl_type))
<class 'bytes'> b'modelview' 1 35676

but upgrading to np==2.3.0 the same line prints to:

<class 'numpy.ndarray'> [109 111 100 101 108 118 105 101 119   0   0   0   0   0   0] 1 35676

same version of pyopengl in both cases

@chrishavlin chrishavlin changed the title replace use of ndarray.decode with np.char.decode investigate failure with np==2.3.0 Jun 17, 2025
@chrishavlin
Copy link
Contributor Author

reported upstream at mcfletch/pyopengl#149

@chrishavlin
Copy link
Contributor Author

going to close this in favor of #203 , also reference issue is at #202

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

Labels

bug Something isn't working code_improvements refactors, rewrites, performance improvements infrastructure Related to CI, versioning, websites, organizational issues, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant