Improved documentation for ClusterFile on the python side (#201)

- Fixed CI job not doing python docs
- added more docs on cluster file 
- fixed generating docs on cluster vector
This commit is contained in:
Erik Fröjdh
2025-06-13 10:41:39 +02:00
committed by GitHub
parent 4976ec1651
commit 11fa95b23c
7 changed files with 40 additions and 8 deletions
+11
View File
@@ -70,6 +70,17 @@ def ClusterFile(fname, cluster_size=(3,3), dtype=np.int32, chunk_size = 1000):
"""
Factory function to create a ClusterFile object. Provides a cleaner syntax for
the templated ClusterFile in C++.
.. code-block:: python
from aare import ClusterFile
with ClusterFile("clusters.clust", cluster_size=(3,3), dtype=np.int32) as cf:
# cf is now a ClusterFile_Cluster3x3i object but you don't need to know that.
for clusters in cf:
# Loop over clusters in chunks of 1000
# The type of clusters will be a ClusterVector_Cluster3x3i in this case
"""
cls = _get_class("ClusterFile", cluster_size, dtype)