From 8e6fe41dc4bc2058c5e53aeb5519b186162f38ed Mon Sep 17 00:00:00 2001 From: abdul124 Date: Thu, 22 Aug 2024 10:19:47 +0800 Subject: [PATCH] compiler: add LinAlgError exception --- artiq/compiler/embedding.py | 3 ++- artiq/coredevice/exceptions.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index a5cb2e6e1..7893762a6 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -112,7 +112,8 @@ class EmbeddingMap: "0:TimeoutError", "0:TypeError", "0:ValueError", - "0:ZeroDivisionError" + "0:ZeroDivisionError", + "0:LinAlgError", ]) def preallocate_runtime_exception_names(self, names): diff --git a/artiq/coredevice/exceptions.py b/artiq/coredevice/exceptions.py index bcc7ab146..313b2e040 100644 --- a/artiq/coredevice/exceptions.py +++ b/artiq/coredevice/exceptions.py @@ -2,6 +2,7 @@ import builtins import linecache import re import os +from numpy.linalg import LinAlgError from artiq import __artiq_dir__ as artiq_dir from artiq.coredevice.runtime import source_loader