Skip to content

Commit

Permalink
Appease Stan
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdalpino committed Jul 30, 2022
1 parent 2566e80 commit 42852b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Transformers/ImageResizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public function resize(array &$sample) : void
{
foreach ($sample as &$value) {
if (DataType::detect($value)->isImage()) {
$width = imagesx($value);
$height = imagesy($value);
$width = imagesx($value) ?: 0;
$height = imagesy($value) ?: 0;

if ($width === $this->width and $height === $this->height) {
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/Transformers/ImageVectorizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ public function fit(Dataset $dataset) : void
$value = $sample[$column];

$this->sizes[$column] = [
imagesx($value),
imagesy($value),
imagesx($value) ?: 0,
imagesy($value) ?: 0,
];
}
}
Expand Down

0 comments on commit 42852b3

Please sign in to comment.