Skip to content

Kronecker Product & Sum #699

Closed
Closed
@adenchfi

Description

@adenchfi

Motivation

Implement the Kronecker product (sometimes known as tensor or direct product) for matrices. The equivalent functionality in numpy is numpy.kron.

Additionally, implement the Kronecker sum, A (kron) I_B + I_A (kron) B, which is one way someone would do it when say creating a N-dimensional Laplacian stencil out of 1D stencils.

The numpy.kron convention for ordering matrix elements would be used.

To discuss:

  • Should the user allocate the resulting array beforehand, or just pass in an allocatable array to be allocated?
    • The former allows for a more performant routine (/function), but the latter means the user doesn't have to figure out the final array sizes themselves.

Prior Art

No response

Additional Information

numpy.kron

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaProposition of an idea and opening an issue to discuss it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions