jo37 has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks and nuns,
I'm facing a strange behaviour of PDL's setops. The intersection of a set having a single value and the empty set produces the singleton instead of the empty set. Am I missing something or is this a bug?
#!/usr/bin/perl use v5.16; use warnings; use PDL; say $PDL::VERSION; my $e = zeroes 0; say "$_ and $e: ", setops $_, 'AND', $e for pdl(1), ones(1), ones(4), +sequence(4); __DATA__ 2.025 1 and Empty[0]: [1] [1] and Empty[0]: [1] [1 1 1 1] and Empty[0]: [1] [0 1 2 3] and Empty[0]: Empty[0]
Greetings,
-jo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: PDL's error or mine?
by choroba (Cardinal) on Feb 22, 2023 at 15:23 UTC | |
Re: PDL's error or mine?
by syphilis (Archbishop) on Feb 23, 2023 at 01:54 UTC | |
by jo37 (Curate) on Feb 23, 2023 at 11:33 UTC | |
by etj (Priest) on Feb 28, 2023 at 02:03 UTC | |
by Anonymous Monk on Feb 23, 2023 at 12:26 UTC | |
by jo37 (Curate) on Feb 23, 2023 at 14:14 UTC | |
by Anonymous Monk on Feb 23, 2023 at 16:38 UTC | |
|