File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
utbot-python/src/main/kotlin/org/utbot/python/newtyping/inference/baseline Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import org.utbot.python.newtyping.utils.weightedRandom
24
24
import org.utbot.python.utils.TemporaryFileManager
25
25
import java.io.File
26
26
import kotlin.random.Random
27
+ import org.utpython.types.pythonTypeName
27
28
28
29
private val EDGES_TO_LINK = listOf (
29
30
EdgeSource .Identification ,
@@ -109,7 +110,8 @@ class BaselineAlgorithm(
109
110
val laudedType = getLaudedType()
110
111
if (laudedType != null ) return laudedType
111
112
}
112
- val randomType = getRandomType() // TODO: Not to do when ndarray (via pythonMethod )
113
+ val isNDArray = pythonMethod.method.methodType.arguments.any{ it.pythonTypeName() == " numpy.ndarray" }
114
+ val randomType = if (! isNDArray) { getRandomType() } else { null }
113
115
if (randomType != null ) return randomType
114
116
}
115
117
You can’t perform that action at this time.
0 commit comments