From 626cf95c4dddce530fe0edd1e85a99082fadf15b Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 26 Apr 2021 15:33:32 -0600 Subject: [PATCH 1/3] Some small fixes to function signatures to make them valid Python --- spec/API_specification/array_object.md | 2 +- spec/API_specification/creation_functions.md | 2 +- spec/API_specification/data_type_functions.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/API_specification/array_object.md b/spec/API_specification/array_object.md index c5ea23491..f0d695b8d 100644 --- a/spec/API_specification/array_object.md +++ b/spec/API_specification/array_object.md @@ -598,7 +598,7 @@ Returns `self[key]`. #### Parameters -- **self**: _<array;>_ +- **self**: _<array>_ - array instance. diff --git a/spec/API_specification/creation_functions.md b/spec/API_specification/creation_functions.md index 7ce12f5d9..90fe0dfda 100644 --- a/spec/API_specification/creation_functions.md +++ b/spec/API_specification/creation_functions.md @@ -290,7 +290,7 @@ Returns evenly spaced numbers over a specified interval. - a one-dimensional array containing evenly spaced values. (function-meshgrid)= -### meshgrid(*arrays, /, *, indexing='xy') +### meshgrid(*arrays, indexing='xy') Returns coordinate matrices from coordinate vectors. diff --git a/spec/API_specification/data_type_functions.md b/spec/API_specification/data_type_functions.md index 8df12d409..678dfded1 100644 --- a/spec/API_specification/data_type_functions.md +++ b/spec/API_specification/data_type_functions.md @@ -8,7 +8,7 @@ A conforming implementation of the array API standard must provide and support t ## Objects in API (function-broadcast-arrays)= -### broadcast_arrays(\*args, /) +### broadcast_arrays(*args) Broadcasts one or more arrays against one another. @@ -50,13 +50,13 @@ Broadcasts an array to a specified shape. - if the array is incompatible with the specified shape (see {ref}`broadcasting`). (function-can-cast)= -### can_cast(from, to, /) +### can_cast(from_, to, /) Determines if one data type can be cast to another data type according {ref}`type-promotion` rules. #### Parameters -- **from**: _Union\[ <dtype>, <array>]_ +- **from_**: _Union\[ <dtype>, <array>]_ - input data type or array from which to cast. From 01ac7c96709c809578935748eb837da4db86e0bc Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 26 Apr 2021 16:38:22 -0600 Subject: [PATCH 2/3] Fix an issue that was breaking the spec parsing in the test suite --- spec/API_specification/data_type_functions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/API_specification/data_type_functions.md b/spec/API_specification/data_type_functions.md index 678dfded1..adde9b6fa 100644 --- a/spec/API_specification/data_type_functions.md +++ b/spec/API_specification/data_type_functions.md @@ -7,7 +7,7 @@ A conforming implementation of the array API standard must provide and support t ## Objects in API -(function-broadcast-arrays)= +(function-broadcast_arrays)= ### broadcast_arrays(*args) Broadcasts one or more arrays against one another. @@ -24,7 +24,7 @@ Broadcasts one or more arrays against one another. - a list of broadcasted arrays. Each array must have the same shape. Each array must have the same dtype as its corresponding input array. -(function-broadcast-to)= +(function-broadcast_to)= ### broadcast_to(x, shape, /) Broadcasts an array to a specified shape. @@ -49,7 +49,7 @@ Broadcasts an array to a specified shape. - if the array is incompatible with the specified shape (see {ref}`broadcasting`). -(function-can-cast)= +(function-can_cast)= ### can_cast(from_, to, /) Determines if one data type can be cast to another data type according {ref}`type-promotion` rules. From 9635d55848f9858426616c16c9f24485b4ef2556 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Mon, 26 Apr 2021 16:43:02 -0600 Subject: [PATCH 3/3] Call the argument to broadcast_arrays 'arrays' This is consistent with meshgrid(). --- spec/API_specification/data_type_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/API_specification/data_type_functions.md b/spec/API_specification/data_type_functions.md index adde9b6fa..9f517dcf5 100644 --- a/spec/API_specification/data_type_functions.md +++ b/spec/API_specification/data_type_functions.md @@ -8,13 +8,13 @@ A conforming implementation of the array API standard must provide and support t ## Objects in API (function-broadcast_arrays)= -### broadcast_arrays(*args) +### broadcast_arrays(*arrays) Broadcasts one or more arrays against one another. #### Parameters -- **\*args**: _Sequence\[ <array> ]_ +- **arrays**: _Sequence\[ <array> ]_ - arrays to broadcast.