Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Encoding and manipulating N-dimensional tensors #534

Open
Labels
discussionDiscussing a topic with no specific actions yetfeatureSomething is missing
@eriknw

Description

@eriknw

We have found that many applications want 3d arrays, and some may need arrays of even higher dimensions.

This is typically handled bystacking arrays such that a single dimension of a GraphBLAS Matrix encodes multiple logical dimensions of a tensor. Performing operations between such objects often requires reorganizing the data so the logical axes align. This is awkward to do today. Can we make it easier?

One option is to add something likenp.moveaxis (https://numpy.org/doc/stable/reference/generated/numpy.moveaxis.html). To make this general, I think we would need to include how the dimensinos of the logical tensor are encoded in Vector or Matrix dimensions, and then how to reorganize it. Some operations--particularly in 3D--can probably be optimized pretty well, and we should try to make things fast when possible.

A quarter-baked proposal may look something like this:A.reorganize(src_shape=((2, 3), (4,2)), dst_axes=((0, 1), (3, 2))). This effectively does a transpose by swapping the last two axes. It may be more natural at times to think in terms of source shape and source indices, or in terms of destination shape and indices (or some mix of the two). This has the potential of being confusing in general, but should hopefully make sense when you actually have data that you need to manipulate.

How far would such an operation go to makingpython-graphblas more usable for tensors? What else do we need for common use cases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionDiscussing a topic with no specific actions yetfeatureSomething is missing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp