8d60cb0e1b7d501cf774039f55b450e26cceb26b,brian2/stateupdaters/exact.py,LinearStateUpdater,__call__,#LinearStateUpdater#Any#Any#Any#,94

Before Change


        // As every symbol in the matrix should be either in the namespace or
        // the specifiers dictionary, it should be sufficient to just check for
        // the presence of any non-constant specifiers.
        for spec in specifiers.itervalues():
            if (any(Symbol(spec.name) in element for element in matrix) and
                not getattr(spec, "constant", False)):
                raise ValueError(("The coefficient matrix for the equations "
                                 "contains "%s", which is not constant.") %
                                 spec.name)
        
        symbols = [Symbol(variable) for variable in variables]
        solution = sp.solve_linear_system(matrix.row_join(constants), *symbols)
        b = sp.Matrix([solution[symbol] for symbol in symbols]).transpose()
        

After Change


        // As every symbol in the matrix should be either in the namespace or
        // the specifiers dictionary, it should be sufficient to just check for
        // the presence of any non-constant specifiers.
        symbols = reduce(operator.add, (el.atoms() for el in matrix))
        // Only check true symbols, not numbers
        symbols = set([str(symbol) for symbol in symbols
                       if isinstance(symbol, Symbol)])

        for symbol in symbols:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: brian-team/brian2
Commit Name: 8d60cb0e1b7d501cf774039f55b450e26cceb26b
Time: 2013-05-03
Author: marcel.stimberg@ens.fr
File Name: brian2/stateupdaters/exact.py
Class Name: LinearStateUpdater
Method Name: __call__


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: dbf623f8ab7a637c5b1b0b12bc9197dc70377d0b
Time: 2017-08-22
Author: yutiansut@qq.com
File Name: QUANTAXIS/QABacktest/QABacktest_stock_day.py
Class Name: QA_Backtest_stock_day
Method Name: QA_backtest_sell_all


Project Name: pfnet/optuna
Commit Name: 6089223516802848b8b42bdc3af0d6c65ca0a1ef
Time: 2019-11-08
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: optuna/pruners/percentile.py
Class Name: PercentilePruner
Method Name: prune