Closed rdzman closed 2 years ago
smacks forehead. Oh my gosh, what an oversight! Thanks for catching this.
Two minor things:
out = isempty (this.VariableValues) || size (this.VariableValues{1}, 1);
size (...) == 0
instead of just letting the size value be coerced to a logical by the ||
? I believe it will produce the exact same result, but seems a bit more readable to me. out = isempty (this.VariableValues) || (size (this.VariableValues{1}, 1) == 0);
This is a big enough bug that I think it justifies making a point release once it's fixed. I'll look at rolling out a Tablicious 0.3.7 release.
The following is an alternative that should be equivalent and potentially more readable, but possibly a little less efficient ...
out = prod (size (this) ) == 0;
Ooh, I like that prod (size ...)
alternative! Seems more readable to me, and the efficiency difference should be negligible.
There may be subtleties with regards to the fact that table
overrides size
, but I think it should work. Just make sure to actually test it first if you want to go that way.
I don't really have a preference, and prod (size ...)
does work. I'm happy to change it to that if you prefer.
Yeah, let's do prod (size ...)
. I think that is a better design, and more readable.
Looking good!
Couple minor things:
prod (size (this) )
should be prod (size (this))
Ok, I think it should be ready now. Thanks for your patience with the style issues.
Yes, looking good! And thank you for being willing to do the style fixes.
I will do testing this evening and then pull it in.
Merged! New release with this coming up in a few days, hopefully.
Fix bug where
isempty(table([]))
returned0
.The
isempty()
method was not checking the number of rows in a table with a non-zero number of columns.