* [#16551](https://bugzilla.scilab.org/16551): `num2cell` returned {} for any input array of empty strings.
* [#16553](https://bugzilla.scilab.org/16553): `unique(["" ""])` returned `["" ""]`.
* [#16557](https://bugzilla.scilab.org/16557): `macr2tree` + `tree2code` translated `e={2}` into `"e=1"` and `e={2,"ab"}` into `"e=[2,"ab"]"`.
+* [#16559](https://bugzilla.scilab.org/16553): `isempty(A)` was true for sparse matrix of dimension 2^16 or larger.
### Bugs fixed in 6.1.0:
{
Sparse* pOut = NULL;
int iDims = (int)_pArgs->size();
+ bool bAllColonIndex = true;
typed_list pArg;
int* piMaxDim = new int[iDims];
int* piCountDim = new int[iDims];
+ for (int i=0; i<iDims; i++)
+ {
+ bAllColonIndex &= (*_pArgs)[i]->isColon();
+ }
+
+ if (bAllColonIndex)
+ {
+ if (iDims > 1) // a(:,...,:)
+ {
+ return this;
+ }
+ else // a(:)
+ {
+ if (isVector())
+ {
+ if (getCols() == 1)
+ {
+ return this;
+ }
+ else
+ {
+ this->transpose((types::InternalType *&)pOut);
+ return pOut;
+ }
+ }
+ pOut = new types::Sparse(getRows()*getCols(), 1, isComplex());
+ if (isComplex())
+ {
+ CplxSparse_t *sp = pOut->matrixCplx;
+ sp->reserve(nonZeros());
+ int k=0;
+ for (size_t i=0; i<getRows(); ++i)
+ {
+ for (Sparse::CplxSparse_t::InnerIterator it(*matrixCplx, i); it; ++it)
+ {
+ sp->insert(it.col()*getRows() + i, 0) = it.value();
+ }
+ }
+ }
+ else
+ {
+ RealSparse_t *sp = pOut->matrixReal;
+ sp->reserve(nonZeros());
+ int k=0;
+ for (size_t i=0; i<getRows(); ++i)
+ {
+ for (Sparse::RealSparse_t::InnerIterator it(*matrixReal, i); it; ++it)
+ {
+ sp->insert(it.col()*getRows() + i, 0) = it.value();
+ }
+ }
+ }
+ }
+ return pOut;
+ }
+
//evaluate each argument and replace by appropriate value and compute the count of combinations
int iSeqCount = checkIndexesArguments(this, _pArgs, &pArg, piMaxDim, piCountDim);
if (iSeqCount == 0)
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2020 - Stéphane MOTTELET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
+// <-- Non-regression test for bug 16559 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/16559
+//
+// <-- Short Description -->
+// A(:,:) is empty for sparse matrix of dimension 2^16 or larger
+
+n = 2^16;
+A = speye(n,n);
+assert_checkequal(size(A,"*"),n*n);
+assert_checkfalse(isempty(A));
\ No newline at end of file