Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix Release 1.2.1 #98

Merged
merged 7 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions pysces/PyscesModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

'''
import os, copy, time
import re
import pickle
import warnings
try:
Expand Down Expand Up @@ -4814,14 +4815,21 @@ def _update_assignment_rule_code(self, rule):
or s in self.__rules__
or s in self.__species__
):
# catch any _init so it doesn't get replaced
replacements.append((s + '_init', '_zzzz_'))
# deal with substrings in symbols
partialmatches = []
for sym in rule['symbols']:
if not re.fullmatch(s, sym) and re.search(s, sym):
partialmatches.append(sym)
# catch any partial matches so they don't get replaced
for e in enumerate(partialmatches):
replacements.append((e[1], '_zzzz_' + str(e[0]) + '_z'))
# replace symbol to get sim data
replacements.append(
('self.' + s, 'self.data_sim.getSimData("' + s + '")[p:q,1]')
)
# revert the _init
replacements.append(('_zzzz_', s + '_init'))
# revert the partial match symbol
for e in enumerate(partialmatches):
replacements.append(('_zzzz_' + str(e[0]) + '_z', e[1]))

for old, new in replacements:
rule['data_sim_string'] = rule['data_sim_string'].replace(old, new)
Expand Down
7 changes: 0 additions & 7 deletions pysces/PyscesStoich.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,19 +753,12 @@ def PLUfactorize(self, a_in):
## except Exception, e:
## print "CLAPACK error", e

if a.shape[0] >= 500 or a.shape[1] >= 500:
print('\nMatrix {} using SciPy version: {} on {}'.format(a.shape, scipy.__version__, os.sys.platform))
print('Error 766 error detector: only report this if your Python crashes now ...')

if Using_FLAPACK == 1:
## results = getrf(numpy.transpose(a)) # brett 20041226
results = getrf(a) # brett 201106

results = list(results)

if a.shape[0] >= 500 or a.shape[1] >= 500:
print('766 error did not occur please continue as normal {} ...'.format(a.shape))

if results[2] < 0:
print('Argument ', results['info'], ' had an illegal value')
raise LinAlgError
Expand Down