Skip to content

fix: return audio, image specific types in .load() and .load_bytes()#1328

Merged
anna-charlotte merged 6 commits intofeat-rewrite-v2from
fix-url-load-return-type
Apr 3, 2023
Merged

fix: return audio, image specific types in .load() and .load_bytes()#1328
anna-charlotte merged 6 commits intofeat-rewrite-v2from
fix-url-load-return-type

Conversation

@anna-charlotte
Copy link
Copy Markdown
Contributor

@anna-charlotte anna-charlotte commented Apr 3, 2023

Goals:

Change return type of .load() from np.ndarray to AudioNdArray/ImageNdArray and .load_bytes() from bytes to AudioBytes/ ImageBytes .

Currently we return np.ndarrays, in the example below it will be cast to AudioNdArray, but PyCharm does not realize this, and therefore does not offer autocompletion, and e.g. complains in line 13 with Unresolved attribute reference 'save' for class 'ndarray'.

image

  • check and update documentation, if required. See guide

@anna-charlotte anna-charlotte force-pushed the fix-url-load-return-type branch 2 times, most recently from 19c49cb to b50a93a Compare April 3, 2023 07:48
anna-charlotte added 5 commits April 3, 2023 10:04
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
@anna-charlotte anna-charlotte force-pushed the fix-url-load-return-type branch from d59500c to 64f895c Compare April 3, 2023 08:06
@anna-charlotte anna-charlotte marked this pull request as ready for review April 3, 2023 08:11
Signed-off-by: anna-charlotte <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2023

📝 Docs are deployed on https://ft-fix-url-load-return-type--jina-docs.netlify.app 🎉

@anna-charlotte anna-charlotte merged commit 9b7c3e2 into feat-rewrite-v2 Apr 3, 2023
@anna-charlotte anna-charlotte deleted the fix-url-load-return-type branch April 3, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants