We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 992fdad + 03cd57e commit 713e060Copy full SHA for 713e060
spine/data/particle.py
@@ -263,8 +263,10 @@ def from_larcv(cls, particle):
263
obj_dict[key] = np.asarray(
264
[getattr(vector, a)() for a in pos_attrs], dtype=np.float32)
265
266
- # Load the other array attributes (special care needed)
267
- obj_dict['children_id'] = np.asarray(particle.children_id(), dtype=int)
+ # Load the other array attributes (special care needed). Note for future
+ # self: need the list comprehension. Direct casting is INSANELY slow...
268
+ obj_dict['children_id'] = np.asarray(
269
+ [i for i in particle.children_id()], dtype=int)
270
271
mom_attrs = ('px', 'py', 'pz')
272
for prefix in ('', 'end_'):
0 commit comments