Skip to content

Commit e6199f3

Browse files
committed
Disallow dlarray in prototype
Using `dlarray` in a prototype results in `dlarray` in the output, but without the dimension labels. Reason: `cast(X,'like',Y)` behaves that way for `dlarray` `Y`. Given that we do not return higher-dimensional data anyway, it is questionable whether there is any reason one would want to allow `dlarray` in prototypes. Not handling them properly means we are better off disabling them altogether. Without a dependency on Deep Learning Toolbox, we cannot have an automated test point for this change, unfortunately.
1 parent 3dfac40 commit e6199f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

+llms/+internal/jsonSchemaFromPrototype.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
schema = struct("type","string");
2828
elseif isinteger(prototype)
2929
schema = struct("type","integer");
30-
elseif isnumeric(prototype)
30+
elseif isnumeric(prototype) && ~isa(prototype,'dlarray')
3131
schema = struct("type","number");
3232
elseif islogical(prototype)
3333
schema = struct("type","boolean");

0 commit comments

Comments
 (0)