Problem solved - thanks to a related question + answer by @jessegrabowski .
The issue turned out to be the distance matrix calculation.
The function def calc_distance_to calculates the euclidean distance between a focal mic in a mic array and all other mics - leading to 0 distance for the focal mic to itself. pt.math.linalg.norm goes haywire while seeing this 0 term - and throws the error. Adding a tiny offset to the distances does not help for some reason.
Things of course worked when I replaced the focal mic indexing with a shape conform pm.Normal because the random distribution almost never produces exactly 0 values.
The solution now is somehow to add a tiny offset (e.g. 1e-9) to the distances, and using pm.math functions rather than the pt.linalg.norm. This is the version of the distance calculation that works.
def calc_distance_to(focalmic, mic_array):
'''
'''
diff = mic_array - focalmic
diff += 1e-9
norm_dist = pm.math.sqrt(pm.math.sum(diff**2, axis=1))
return norm_dist
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | 🚀 Release pymc-extras v0.14.0 | 0 | 19.63 | 28-07-2026 |
| 2 | 🚀 Release pymc-extras v0.13.0 | 0 | 19.63 | 13-07-2026 |
| 3 | Arviz Issues following Tutorials | 0 | 7.44 | 21-07-2026 |
| 4 | Regarding GSOC 2027 and PyMC projects | 0 | 7.73 | 28-07-2026 |
| 5 | 🚀 Release pymc-extras v0.13.1 | 0 | 19.63 | 19-07-2026 |
| 6 | 🚀 Release v6.2.0 | 0 | 18.52 | 23-07-2026 |
| 7 | New contributor looking to get started — background in ML/RAG research | 0 | 10.42 | 23-07-2026 |
| 8 | Hidden Markov Models in PyMC: marginalize and recover a DiscreteMarkovChain | 0 | 4.78 | 13-07-2026 |
| 9 | Pymc_forecast — a new Bayesian time-series forecasting toolkit for PyMC | 0 | 19.35 | 17-07-2026 |