Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in matrix creation options #352

Closed
williamstein opened this issue Apr 19, 2007 · 1 comment
Closed

error in matrix creation options #352

williamstein opened this issue Apr 19, 2007 · 1 comment

Comments

@williamstein
Copy link
Contributor

> After trying some things, I've noticed that it is possible to coerce a
> flat list into a sparse matrix but not a list of lists.
> 
> E.G.
> sage: B = MatrixSpace(ZZ,5,5)
> sage: v = [0 for i in range(25)]
> sage: u = [[0 for i in range(5)] for j in range(5)]
> sage: B(v)
> [0 0 0 0 0]
> [0 0 0 0 0]
> [0 0 0 0 0]
> [0 0 0 0 0]
> [0 0 0 0 0]
> 
> sage: B(u) ---> results in the same error as before.
> Is there a conceptual reason that a flat list works, but a list of

That looks like just a mistake on our paper.  We should make
it so both cases work. 

Component: linear algebra

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

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Aug 18, 2007

comment:1

This work since at least Sage 2.8.1

----------------------------------------------------------------------
| SAGE Version 2.8.1, Release Date: 2007-08-18                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: B = MatrixSpace(ZZ,5,5)
sage: v = [0 for i in range(25)]
sage: u = [[0 for i in range(5)] for j in range(5)]
sage: B(u)

[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
sage: B(v)

[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Aug 18, 2007
@williamstein williamstein added this to the sage-2.8.2 milestone Aug 18, 2007
tobiasdiez pushed a commit to tobiasdiez/sage that referenced this issue Feb 22, 2024
* Update pre-commit tools

* update blaken-docs
mkoeppe added a commit to mkoeppe/sage that referenced this issue Nov 11, 2024
pkgs/sage-project-cookiecutter/pyproject.toml: passagemath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant