inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.04k stars 239 forks source link

abrupt in code #643

Closed tangyu-ty closed 1 year ago

tangyu-ty commented 1 year ago

image Why is it so abrupt in the middle of the code?(empty = Array)

demo_array.py in examps

kif commented 1 year ago

I guess it is just a way to declare empty (which is a factory to generate an empty array) with the same API as the constructor of the class ?

tangyu-ty commented 1 year ago

sorry, it's in pyopencl/array.py

I just wonder why it is placed in the middle of some methods of this module instead of the beginning or the end。'Array' is a class。

class Array is between 338 to 2294. (Number of rows) Next are some methods or class of array.py

tangyu-ty commented 1 year ago

I guess it is just a way to declare empty (which is a factory to generate an empty array) with the same API as the constructor of the class ?

image