From 3d16816bca34c961961f6b64c36f6c55bc019582 Mon Sep 17 00:00:00 2001 From: Stephannie Jimenez Date: Sat, 29 Jul 2023 20:44:02 -0500 Subject: [PATCH 1/2] Add migration guide --- spec/draft/index.rst | 1 + spec/draft/migration_guide.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 spec/draft/migration_guide.md diff --git a/spec/draft/index.rst b/spec/draft/index.rst index 3e51cc68e..13c2dfe80 100644 --- a/spec/draft/index.rst +++ b/spec/draft/index.rst @@ -33,5 +33,6 @@ Contents :caption: Other :maxdepth: 1 + migration_guide changelog license diff --git a/spec/draft/migration_guide.md b/spec/draft/migration_guide.md new file mode 100644 index 000000000..6831b9a33 --- /dev/null +++ b/spec/draft/migration_guide.md @@ -0,0 +1,14 @@ +# Migration Guide + +## Introduction + +The Array API Standard was based in the common APIs across multiple Python array libraries as a response to the fragmentation of the ecosystem. It was decided for the Array API Standard to be as compact as possible, meaning that it doesn't include all the creation and manipulation functions available in other libraries, but it is equally as powerful. The aim of this guide is to help users get started with the use of the Array API by providing common equivalents with the NumPy API. + +Depending on the version of the Array API Standard that you are intended to use, the number of total APIs may vary and this migration guide is using the latest version `v2022.12`. + +## Equivalents + +| NumPy | Array API | +| ----- | --------- | +| `ravel(x)` | `reshape(x, (-1,))` | +| `flatten(x)` | `reshape(x, (-1,))` | From e1330e5bcef2b0f9cf104c1e397a86fa5483f026 Mon Sep 17 00:00:00 2001 From: Stephannie Jimenez Date: Fri, 4 Aug 2023 17:09:52 -0500 Subject: [PATCH 2/2] add review changes --- spec/draft/migration_guide.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/draft/migration_guide.md b/spec/draft/migration_guide.md index 6831b9a33..09ebdc288 100644 --- a/spec/draft/migration_guide.md +++ b/spec/draft/migration_guide.md @@ -2,7 +2,9 @@ ## Introduction -The Array API Standard was based in the common APIs across multiple Python array libraries as a response to the fragmentation of the ecosystem. It was decided for the Array API Standard to be as compact as possible, meaning that it doesn't include all the creation and manipulation functions available in other libraries, but it is equally as powerful. The aim of this guide is to help users get started with the use of the Array API by providing common equivalents with the NumPy API. +The Array API Standard was based in the common APIs across multiple Python array libraries as a response to the fragmentation of the ecosystem. It was decided for the Array API Standard to be as compact as possible, meaning that it doesn't include all the creation and manipulation functions available in other libraries resulting that in some cases library-specific code paths may need to be used. If you encounter a function that is not easy to translate, please check if it has an open discussion in the [issue tracker](https://github.com/data-apis/array-api/issues), if not please request it via a new issue. + +The aim of this guide is to help users get started with the use of the Array API by providing common equivalents with the NumPy API. Your input can be very valuable for us, so please feel free to contribute to this page by adding more equivalents. Depending on the version of the Array API Standard that you are intended to use, the number of total APIs may vary and this migration guide is using the latest version `v2022.12`.