We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97647cd commit b6c3b77Copy full SHA for b6c3b77
pyRDDLGym/core/intervals.py
@@ -1,6 +1,16 @@
1
+import traceback
2
import numpy as np
-from scipy.special import gamma
3
-import scipy.stats as stats
+
4
+# try to load scipy
5
+try:
6
+ from scipy.special import gamma
7
+ import scipy.stats as stats
8
+except Exception:
9
+ raise_warning('failed to import scipy: '
10
+ 'some interval arithmetic operations will fail.', 'red')
11
+ traceback.print_exc()
12
+ gamma = None
13
+ stats = None
14
15
from typing import Dict, Optional, Tuple
16
from enum import Enum
@@ -22,6 +32,7 @@
22
32
23
33
24
34
class IntervalAnalysisStrategy(Enum):
35
+ '''Specifies how bounds on random variables should be propagated.'''
25
36
SUPPORT = 1
26
37
PERCENTILE = 2
27
38
MEAN = 3
requirements.txt
@@ -4,5 +4,4 @@ gymnasium
numpy>=1.22
pygame
ply
-scipy
termcolor
0 commit comments