Skip to content

scipy.linregress: unsupported operand type(s) #6191

@phpfs

Description

@phpfs

Hello!

When I try to use SparkysWidgets/MinipHBFW in Python3, I get this error:

user@host.domain:~$ python3 pHReader.py          
Traceback (most recent call last):     
  File "pHReader.py", line 69, in <module>          
    main()     
  File "pHReader.py", line 60, in main     
    phr = pHReader()     
  File "pHReader.py", line 33, in __init__     
    self.params = pHParams.pHParams()     
  File "/home/user/pHParams.py", line 31, in __init__     
    self.slope, self.intercept = self.calc_ph_slope()     
  File "/home/user/pHParams.py", line 97, in calc_ph_slope     
    slope, intercept, r_value, p_value, std_err = scipy.linregress(x, y)     
  File "/usr/lib/python3/dist-packages/scipy/stats/stats.py", line 3008, in linregress     
    ymean = np.mean(y,None)     
  File "/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py", line 2716, in mean     
    out=out, keepdims=keepdims)     
  File "/usr/lib/python3/dist-packages/numpy/core/_methods.py", line 69, in _mean     
    ret = ret / rcount     
TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'     

Is it related to scipy or a problem of MinipHBFW?

Thank you for helping me out :)

Greetings, phpfs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions