Skip to content

Commit

Permalink
IO::FITS more efficient dims-check
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Sep 30, 2024
1 parent 28b52b9 commit c78d17b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions IO/FITS/FITS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2311,9 +2311,8 @@ sub _prep_table {

# First, check we're legit
if( !UNIVERSAL::isa($var, 'PDL') ||
$var->ndims != 2 ||
!UNIVERSAL::isa($lengths,'PDL') ||
$lengths->ndims != 1 ||
($var->ndims - $lengths->ndims) != 1 ||
$lengths->dim(0) != $var->dim(0)
) {
die <<FOO;
Expand Down

0 comments on commit c78d17b

Please sign in to comment.