We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16dbf2f commit 9dfa831Copy full SHA for 9dfa831
lib/AI/TensorFlow/Libtensorflow/Lib/FFIType/Variant/PackableMaybeArrayRef.pm
@@ -20,6 +20,7 @@ sub make_variant {
20
my $perl_to_native = install perl_to_native => sub {
21
my ($value, $i) = @_;
22
if( defined $value ) {
23
+ die "Value must be an ArrayRef" unless ref $value eq 'ARRAY';
24
my $data = pack $arguments{pack_type} . '*', @$value;
25
my $n = scalar @$value;
26
my ($pointer, $size) = scalar_to_buffer($data);
0 commit comments