Skip to content

Commit 9d34c7e

Browse files
authored
Merge pull request #700 from RocketPy-Team/bug/single-point-functions
BUG: Single Point Functions Can Not Be Defined
2 parents 3d9546e + a49b774 commit 9d34c7e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rocketpy/mathutils/function.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3247,12 +3247,12 @@ def __validate_source(self, source): # pylint: disable=too-many-statements
32473247
)
32483248

32493249
source_len, source_dim = source.shape
3250-
3251-
if source_len < source_dim:
3252-
raise ValueError(
3253-
"Too few data points to define a domain. The number of rows "
3254-
"must be greater than or equal to the number of columns."
3255-
)
3250+
if not source_len == 1: # do not check for one point Functions
3251+
if source_len < source_dim:
3252+
raise ValueError(
3253+
"Too few data points to define a domain. The number of rows "
3254+
"must be greater than or equal to the number of columns."
3255+
)
32563256

32573257
return source
32583258

0 commit comments

Comments
 (0)