isimage: also check if input is real
author |
carandraug |
date |
Sun, 02 Sep 2012 03:17:47 +0000 |
parents |
cefe03364864 |
children |
d70dc84b2cac |
files |
inst/isind.m inst/private/isimage.m |
diffstat |
2 files changed, 2 insertions(+), 2 deletions(-)
[+]
|
line diff
--- a/inst/isind.m
+++ b/inst/isind.m
@@ -39,7 +39,7 @@
bool = false;
if (!isimage (img))
bool = false;
- elseif (ndims (img) == 2 && isreal (img))
+ elseif (ndims (img) == 2)
switch (class (img))
case "double"
bool = isindex (img);
--- a/inst/private/isimage.m
+++ b/inst/private/isimage.m
@@ -18,7 +18,7 @@
function bool = isimage (img)
bool = true;
- if (!ismatrix (img) || issparse (img) || isempty (img))
+ if (!ismatrix (img) || issparse (img) || isempty (img) || !isreal (img))
bool = false;
endif
endfunction