Skip to content

Conversation

@eriknw
Copy link
Member

@eriknw eriknw commented Dec 19, 2021

When creating a Matrix, a Vector is handled as an Nx1 Matrix.

I still need to update the docstring for usage.
I would also like to add v.ss.split for Vectors.

For example:

>>> gb.ss.concat([v, v])  # Vector, size=2*N
>>> gb.ss.concat([[v], [v]])  # Matrix, nrows=2*N, ncols=1
>>> gb.ss.concat([[v, v]])  # Matrix, nrows=N, ncols=2

When creating a Matrix, a Vector is handled as an Nx1 Matrix.

I still need to update the docstring for usage.
I would also like to add `v.ss.split` for Vectors.
@eriknw
Copy link
Member Author

eriknw commented Dec 19, 2021

Now that Matrix objects have ._parent attribute that are responsible for freeing memory, we could make from_pygraphblas not invalidate the pygraphblas Matrix. They could both remain valid while using the same underlying GraphBLAS object.

@eriknw eriknw merged commit 1948a33 into python-graphblas:main Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant