I Just installed brian2 and i tried to test it as suggested. 2 of 4 tests have failed, and i can’t find a clue on why.

Do you have any tip?

================

import brian2

brian2.test()

=========================

I tried to search for those errors on internet but i couldn’t find a clue

====================

The 2 failures are:

_________________________________________________________________________ [doctest] brian2.stateupdaters.explicit.split_expression _________________________________________________________________________

054 function-independent terms and terms involving `f`

) and the

055 stochastic part of the expression (terms involving `g`

and/or `dW`

).

056

057 Examples

058 --------

059 >>> split_expression(‘dt * __f(__x, __t)’)

060 (dt*__f(__x, __t), None)

061 >>> split_expression(‘dt * __f(__x, __t) + __dW * __g(__x, __t)’)

062 (dt*__f(__x, __t), __dW*__g(__x, __t))

063 >>> split_expression('1/(2*dt**.5)*(__g_support - __g(__x, __t))*(__dW 2)')*__g_support

Expected:

(0, __dW2

*dt**(-0.5)/2 - __dW**2*dt**(-0.5)

*__g(__x, __t)/2)*

Got:

(0, __dW**2__g_support/(2

Got:

(0, __dW**2

*dt*__g(__x, __t)/(2*dt**0.5))

**0.5) - __dW**2/home/daniele/Scrivania/PythonCode/pythonenv/brian/lib/python3.8/site-packages/brian2/stateupdaters/explicit.py:63: DocTestFailure

@pytest.mark.codegen_independent

def test_numpy_functions_logical():

‘’’

Assure that logical numpy functions work on all quantities and return

unitless boolean arrays.

‘’’

unit_values1 = [3 * mV, np.array([1, 2]) * mV, np.ones((3, 3)) * mV]

unit_values2 = [3 * second, np.array([1, 2]) * second,

np.ones((3, 3)) * second]

for ufunc in UFUNCS_LOGICAL:

for value1, value2 in zip(unit_values1, unit_values2):

try:

# one argument

`result_units = eval('np.%s(value1)' % ufunc)`

brian/lib/python3.8/site-packages/brian2/tests/test_units.py:976:

???

E TypeError: logical_and() takes from 2 to 3 positional arguments but 1 were given

:1: TypeError

========================