Skip to content

Commit 1dd4678

Browse files
committed
remove column mentions for now
1 parent 0f4188b commit 1dd4678

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

spec/API_specification/dataframe_api/column_object.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -802,11 +802,6 @@ def to_array(self) -> Any:
802802
may choose to return a numpy array (for numpy prior to 2.0), with the
803803
understanding that consuming libraries would then use the
804804
``array-api-compat`` package to convert it to a Standard-compliant array.
805-
806-
Notes
807-
-----
808-
To be guaranteed to run across all implementations, :meth:`may_execute` should
809-
be executed at some point before calling this method.
810805
"""
811806
...
812807

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def shape(self) -> tuple[int, int]:
6767
6868
Notes
6969
-----
70-
To be guaranteed to run across all implementations, :meth:`may_execute` should
70+
To be guaranteed to run across all implementations, :meth:`maybe_execute` should
7171
be executed at some point before calling this method.
7272
"""
7373
...
@@ -934,7 +934,7 @@ def to_array(self, dtype: DType) -> Any:
934934
understanding that consuming libraries would then use the
935935
``array-api-compat`` package to convert it to a Standard-compliant array.
936936
937-
To be guaranteed to run across all implementations, :meth:`may_execute` should
937+
To be guaranteed to run across all implementations, :meth:`maybe_execute` should
938938
be executed at some point before calling this method.
939939
"""
940940

spec/design_topics/execution_model.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The Dataframe API has a `DataFrame.maybe_evaluate` for addressing the above. We
4747
as follows:
4848
```python
4949
df: DataFrame
50-
df = df.may_execute()
50+
df = df.maybe_execute()
5151
features = []
5252
for column_name in df.column_names:
5353
if df.col(column_name).std() > 0:
@@ -62,22 +62,21 @@ For example, a dataframe which can convert to a lazy array could decide to ignor
6262
`maybe_evaluate` when evaluting `DataFrame.to_array` but to respect it when evaluating
6363
`float(Column.std())`.
6464

65-
Operations which require `DataFrame.may_execute` to have been called at some prior
65+
Operations which require `DataFrame.maybe_execute` to have been called at some prior
6666
point are:
6767
- `DataFrame.to_array`
6868
- `DataFrame.shape`
69-
- `Column.to_array`
7069
- calling `bool`, `int`, or `float` on a scalar
7170

72-
Note now `DataFrame.may_execute` is called only once, and as late as possible.
71+
Note now `DataFrame.maybe_execute` is called only once, and as late as possible.
7372
Conversely, the "wrong" way to execute the above would be:
7473

7574
```python
7675
df: DataFrame
7776
features = []
7877
for column_name in df.column_names:
7978
# Do NOT do this!
80-
if df.may_execute().col(column_name).std() > 0:
79+
if df.maybe_execute().col(column_name).std() > 0:
8180
features.append(column_name)
8281
return features
8382
```

0 commit comments

Comments
 (0)