Skip to content

Commit 47e52f2

Browse files
committed
bug in model.Ising
failed to set calc_observables data member, which led to problems for systems with N>9, without Ising eqn files
1 parent dbbe25d commit 47e52f2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

RELEASE_NOTES

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
SOFTWARE.
2424

2525

26-
v2.4.2 (To be released 2021/02)
26+
v2.4.2 (Released 2021/04)
2727
----------------------------------------------------
28+
- Fixed instantiation bug in model.Ising (thanks to saynbabul for pointing this
29+
out).
2830

2931
v2.4.1 (Released 2021/01)
3032
----------------------------------------------------

coniii/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,14 @@ def __init__(self, multipliers, rng=None, n_cpus=None, verbose=False):
172172
else:
173173
raise Exception("Unrecognized format for multipliers.")
174174

175-
self.calc_e, _, _ = define_ising_helper_functions()
175+
self.calc_e, self.calc_observables, _ = define_ising_helper_functions()
176176
try:
177177
ising = import_module('coniii.ising_eqn.ising_eqn_%d_sym'%self.n)
178178
self._calc_observables = ising.calc_observables
179179
self._calc_p = ising.p
180180
except ModuleNotFoundError:
181181
self._calc_observables = None
182182
self._calc_p = None
183-
self.calc_observables = None
184183
self.calc_p = None
185184
self.set_multipliers(multipliers)
186185

0 commit comments

Comments
 (0)