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

DM-42685 Add a Tensor interface to analysis tools #195

Merged
merged 2 commits into from Jan 26, 2024
Merged

Conversation

natelust
Copy link
Contributor

This commit adds an interface that can be used to represent multi-dimensional data like images, or stacks of images. It uses an industry standard interface to ensure analysis tools can work with a wide variety of data types from numpy arrays to pytorch models.

@natelust natelust force-pushed the tickets/DM-42685 branch 2 times, most recently from 8190e95 to 25bb326 Compare January 26, 2024 14:33
@@ -29,6 +29,7 @@
"MetricResultType",
"MetricAction",
"PlotResultType",
"PlotElement",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to add this (and associated class below) on this ticket?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, when I switched branches it looks like my editor thought it was code still active in the buffer or something

Technically one could use this for scalars or 1D arrays,
but for those the Scalar or Vector interface should be preferred.

`Tensor`\ s abstract around the idea of a multidimensional array, and work
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of the "\ s"? Is it an attempt to preserve a space? Is it needed? And will it work? I'd imagine you may need to double-escape "\" here to make this work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the past this has been how you have a link (to Tensor in this case) and have an s at the end of it. You can't include it in the quotes or sphinx can't find the object. the \ is an escape sequence on the space that says don't include this in formatting.

@leeskelvin
Copy link
Contributor

Do you need to add reference to Tensor here?

yield from ((column, Vector | Scalar) for column in self.vectorKeys) # type: ignore

@leeskelvin
Copy link
Contributor

PS - see also here:

yield from ((column, Vector | Scalar) for column in self.vectorKeys) # type: ignore

@natelust natelust force-pushed the tickets/DM-42685 branch 2 times, most recently from 8309100 to 6f52a83 Compare January 26, 2024 18:27
This commit adds an interface that can be used to represent
multi-dimensional data like images, or stacks of images. It uses
an industry standard interface to ensure analysis tools can work
with a wide variety of data types from numpy arrays to pytorch
models.
@natelust natelust merged commit ae39a55 into main Jan 26, 2024
8 checks passed
@natelust natelust deleted the tickets/DM-42685 branch January 26, 2024 19:02
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.

None yet

2 participants