From 82c7ccbb3dbb6a2254c5806757f4b05982da336a Mon Sep 17 00:00:00 2001 From: Dae Heun Koh Date: Wed, 7 Feb 2024 17:16:58 -0800 Subject: [PATCH] Minor fix to np.copy changes --- analysis/classes/Interaction.py | 2 +- analysis/classes/Particle.py | 2 +- analysis/classes/TruthParticleFragment.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/analysis/classes/Interaction.py b/analysis/classes/Interaction.py index df8a31be..7f74c761 100644 --- a/analysis/classes/Interaction.py +++ b/analysis/classes/Interaction.py @@ -84,7 +84,7 @@ def __init__(self, self.nu_id = int(nu_id) self.volume_id = int(volume_id) self.image_id = int(image_id) - self.vertex = vertex + self.vertex = np.copy(vertex) self.vertex_mode = vertex_mode self.is_neutrino = is_neutrino self._units = units diff --git a/analysis/classes/Particle.py b/analysis/classes/Particle.py index ee1f6fa1..c0386b0d 100644 --- a/analysis/classes/Particle.py +++ b/analysis/classes/Particle.py @@ -138,7 +138,7 @@ def __init__(self, self.volume_id = int(volume_id) self.semantic_type = int(semantic_type) - self.index = np.copy(index) + self.index = index self.points = points self.sources = sources self.depositions = depositions diff --git a/analysis/classes/TruthParticleFragment.py b/analysis/classes/TruthParticleFragment.py index 03b4240d..ec762ea7 100644 --- a/analysis/classes/TruthParticleFragment.py +++ b/analysis/classes/TruthParticleFragment.py @@ -44,7 +44,7 @@ def __init__(self, # Set attributes self._depositions_MeV = np.atleast_1d(depositions_MeV) - self.truth_index = np.copy(truth_index) + self.truth_index = truth_index self._truth_points = truth_points self._truth_depositions = np.atleast_1d(truth_depositions) # Must be ADC self._truth_depositions_MeV = np.atleast_1d(truth_depositions_MeV) # Must be MeV