[bug #68300] blkdiag with arguments of type single returns result of type double
"Dmitri A. Sergatskov" <[email protected]> Sat, 2 May 2026 00:23:40 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
Follow-up Comment #1, bug #68300 (group octave):
Attached CSET fixes that for me:
octave:1> A=single(ones(2))
A =
1 1
1 1
octave:2> B=blkdiag(A,A)
B =
1 1 0 0
1 1 0 0
0 0 1 1
0 0 1 1
octave:3> whos
Variables visible from the current scope:
variables in scope: top scope
Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 2x2 16 single
B 4x4 64 single
Total is 20 elements using 80 bytes
(file bug68300_blkdiag_20260502_100.cset)
Since this is just an M-file, you can replace your with the attached copy
(file blkdiag.m)
Dmitri.
--
(file #58534, file #58535)
_______________________________________________________
Additional Item Attachment:
Name: bug68300_blkdiag_20260502_100.cset Size: 6.2KiB
<https://file.savannah.gnu.org/file/bug68300_blkdiag_20260502_100.cset?file_id=58534>
Name: blkdiag.m Size: 7.2KiB
<https://file.savannah.gnu.org/file/blkdiag.m?file_id=58535>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-c36938be85ff6c1b727bc7dd7fd30e48f9142870.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68300>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCafV8TAAKCRCqLAuaBUf3 ToQeAP9sSHQu+2mHXYwCXrXdIAWYMgIbh3r22b//pw9Q5mixiwEA/IcRPRyW/HMJ UiKIEQ6TgJ9+XdinjhBwdakd4wy8BQ8= =ajN7 -----END PGP SIGNATURE-----