We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 929f181 + e17f080 commit 2a2b254Copy full SHA for 2a2b254
1 file changed
pyrecest/distributions/hypersphere_subset/von_mises_fisher_distribution.py
@@ -23,7 +23,7 @@
23
zeros,
24
)
25
from scipy.special import iv
26
-
+import copy
27
from .abstract_hyperspherical_distribution import AbstractHypersphericalDistribution
28
29
@@ -127,11 +127,14 @@ def from_mean_resultant_vector(m):
127
128
def mode(self):
129
return self.mu
130
+
131
+ def set_mean(self, new_mean):
132
+ self.set_mode(new_mean)
133
134
def set_mode(self, new_mode):
135
assert new_mode.shape == self.mu.shape
136
dist = self
- dist.mu = new_mode
137
+ dist.mu = copy.deepcopy(new_mode)
138
return dist
139
140
def multiply(self, other: "VonMisesFisherDistribution"):
0 commit comments