Skip to content

fractional matrix indices are allowed ? #190

@williamstein

Description

@williamstein

Bug reported by Andrey Novoseltsev

This is disturbing.

a=matrix(2,2,[1,2,3,4]); a
///
[1 2]
[3 4]
a.row(1.5)
///
(3, 4)
a[1.5]
///
(3, 4)
a[1]
///
(3, 4)
a[1.4, 0.8]
///
3
a[1,0]
///
3

The unfortunate thing is that SageX converts things to Py_ssize_t without
any type checking. Maybe this is way faster ... Anyway, it should be possible
to instead call whatever C library function __getitem__ uses, which would then
have the right behavior.

Component: linear algebra

Issue created by migration from https://trac.sagemath.org/ticket/190

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions