Skip to content

TypeError for inferring lambda_min by estimating extremal eigenvalues #17

@JackSong88

Description

@JackSong88

Reproduction

gdl.ld[22].get_lambda_min("min") when the LDMatrix do not have 'Extremal' in spectral_props and lambda_min needs to be inferred.

Error Traceback

TypeError                                 Traceback (most recent call last)
Cell In[3], line 1
----> 1 gdl.ld[22].get_lambda_min("min")

File .../magenpy/LDMatrix.py:1372, in LDMatrix.get_lambda_min(self, aggregate, min_max_ratio)
   1369         raise ValueError('Aggregating lambda_min across blocks '
   1370                          'requires that these blocks are pre-defined.')
   1371     else:
-> 1372         lambda_min = threshold_lambda_min(self.estimate_extremal_eigenvalues())
   1374 else:
   1376     spectral_props = self.get_store_attr('Spectral properties')

File .../magenpy/LDMatrix.py:1363, in LDMatrix.get_lambda_min.<locals>.threshold_lambda_min(eigs)
   1362 def threshold_lambda_min(eigs):
-> 1363     return np.abs(np.minimum(eigs['min'] + min_max_ratio*eigs['max'], 0.)) / (1. + min_max_ratio)

TypeError: can't multiply sequence by non-int of type 'float'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions