Skip to content

Commit 48f9686

Browse files
authored
fixed tree replacement bug (#63)
* fixed tree replacement bug * Completed featureloding non-awkward input methods * added exclusive_subdmerge * Fixed listoffset-indexed array bug * Added test for bugfix * fixed attribute check error * Added several methods * Added parameter addition to some outgoing awkward arrays * Added parameter adding * Added basic numpy array handling * Added constituents for general case * removed numpy infrastructure
1 parent 4fb2d3d commit 48f9686

9 files changed

+758
-44
lines changed

docs/AwkwardClusterSequence.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
fastjet package
2+
===============
3+
4+
Awkward handling
5+
----------------
6+
7+
8+
.. autoclass:: fastjet._pyjet
9+
:members:
10+
:undoc-members:
11+
:show-inheritance:
12+
:private-members:
13+
:special-members:

docs/conf.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# Warning: do not change the path here. To use autodoc, you need to install the
88
# package first.
99

10+
import os
11+
import sys
1012
from typing import List
1113

1214
# -- Project information -----------------------------------------------------
@@ -15,7 +17,8 @@
1517
copyright = "2021, The Scikit-HEP admins"
1618
author = "Aryan Roy"
1719

18-
20+
sys.path.insert(0, os.path.abspath("../src/fastjet"))
21+
sys.path.insert(0, os.path.abspath(".."))
1922
# -- General configuration ---------------------------------------------------
2023

2124
# Add any Sphinx extension module names here, as strings. They can be
@@ -47,3 +50,5 @@
4750
# relative to this directory. They are copied after the builtin static files,
4851
# so a file named "default.css" will overwrite the builtin "default.css".
4952
html_static_path: List[str] = []
53+
54+
master_doc = "index"

docs/index.rst

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11

2-
Welcome to documentation!
3-
=========================
2+
**Welcome to documentation!**
3+
=============================
44

55

66
Introduction
77
------------
88

9-
This should be updated!
9+
Fastjet is a library for perfomring Jet-Finding *within* the Scikit-HEP ecosystem.
10+
11+
.. note::
12+
This project is under active development.
13+
1014

1115
.. toctree::
1216
:maxdepth: 2
1317
:titlesonly:
1418
:caption: Contents
1519
:glob:
1620

21+
AwkwardClusterSequence
22+
1723

24+
.. autoclass:: fastjet.ClusterSequence
25+
:members:
1826

1927
Indices and tables
2028
==================

src/fastjet/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# BSD 3-Clause License; see https://github.com/scikit-hep/fastjet/blob/main/LICENSE
22

33
import awkward as ak
4+
import numpy as np
45

56
import fastjet._ext # noqa: F401, E402
67
import fastjet._pyjet # noqa: F401, E402
@@ -201,7 +202,7 @@ class ClusterSequence: # The super class
201202
def __init__(self, data, jetdef):
202203
if not isinstance(jetdef, fastjet._swig.JetDefinition):
203204
raise AttributeError("JetDefinition is not correct")
204-
if isinstance(data, ak.Array):
205+
if isinstance(data, ak.Array) or isinstance(data, np.ndarray):
205206
self.__class__ = fastjet._pyjet.AwkwardClusterSequence
206207
fastjet._pyjet.AwkwardClusterSequence.__init__(
207208
self, data=data, jetdef=jetdef

0 commit comments

Comments
 (0)