epfl-lts2 / pygsp

Graph Signal Processing in Python
https://pygsp.rtfd.io
BSD 3-Clause "New" or "Revised" License
483 stars 93 forks source link

Inquiry About AssertionError in compute_fourier_basis Function #111

Open Yi-ellen opened 2 months ago

Yi-ellen commented 2 months ago

Hello,

I am reaching out to discuss an issue I encountered while using the pygsp library. Specifically, I am working with the compute_fourier_basis function defined in the pygsp/graphs/fourier.py file.

Upon running this function on a large sparse undirected weighted graph, I received an AssertionError at the following assert statement: assert -1e-5 < self._e[0] < 1e-5. I am curious about the basis for this assertion and whether it is a strict requirement for self._e[0] to be within this range.

Could you please provide some clarification on the following:

  1. What is the rationale for setting the range for self._e[0] in this assertion?
  2. Is it a definitive error if self._e[0] does not fall within this range, or are there exceptions or special cases to consider?

I would appreciate any guidance you can offer to help me understand and resolve this issue.

Thank you for your time and assistance.