Skip to content

docs: add mention and example for type coercion#1572

Merged
samsja merged 2 commits into
docarray:docs-tensor-typefrom
Tanguyabel:docs-type-coercion
May 24, 2023
Merged

docs: add mention and example for type coercion#1572
samsja merged 2 commits into
docarray:docs-tensor-typefrom
Tanguyabel:docs-type-coercion

Conversation

@Tanguyabel

Copy link
Copy Markdown
Contributor

This PR brings changes to the docs where we mention type coercion for Tensor, with an example.

Signed-off-by: Tanguy Abel <tanguy.abel@gmail.com>
@Tanguyabel Tanguyabel force-pushed the docs-type-coercion branch from 2527122 to 8c196d3 Compare May 24, 2023 14:31

@samsja samsja left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good.

Tho readme is not the right section for this.

IMO the best would be that you put it in a Tensor section here : https://docs.docarray.org/data_types/first_steps/

@Tanguyabel

Copy link
Copy Markdown
Contributor Author

looks good.

Tho readme is not the right section for this.

IMO the best would be that you put it in a Tensor section here : https://docs.docarray.org/data_types/first_steps/

@samsja I understand what you say. I added the mention there because:

  • it is in this openable section "Click for more details", where we already mention that one can specify the shape of a tensor, so I thought it could go well together, as it is kinda related
  • in the data type section that you mention, there is no subsection related to a generic tensor, instead we focus on specific modality; however, type coercion applies to any kind of tensor. It also looks a bit too much detailed for the data type intro page imo

Any suggestion?

@makram93 makram93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we also highlight type coercion to AnyTensor in this doc?

@samsja

samsja commented May 24, 2023

Copy link
Copy Markdown
Member

Then lets move it to the BaseDoc section at the end. I don't think we should overload the readme

@samsja samsja changed the base branch from main to docs-tensor-type May 24, 2023 15:29
@samsja

samsja commented May 24, 2023

Copy link
Copy Markdown
Member

merging into my pr because I am taking over this to add it into my new Tensor section

@samsja samsja merged commit c169645 into docarray:docs-tensor-type May 24, 2023
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.

3 participants