Skip to content

Commit

Permalink
spell check fix python/
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikeyann committed Nov 15, 2021
1 parent 85c4146 commit 4a70ded
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def to_gpu_array(self, fillna=None) -> "cuda.devicearray.DeviceNDArray":
else:
return self.dropna(drop_nan=False).data_array_view

# TODO: This method is decpreated and can be removed when the associated
# TODO: This method is deprecated and can be removed when the associated
# Frame methods are removed.
def to_array(self, fillna=None) -> np.ndarray:
"""Get a dense numpy array for the data.
Expand Down Expand Up @@ -1851,7 +1851,7 @@ def as_column(

arbitrary = np.asarray(arbitrary)

# Handle case that `arbitary` elements are cupy arrays
# Handle case that `arbitrary` elements are cupy arrays
if (
shape
and shape[0]
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def infer_format(element: str, **kwargs) -> str:
if len(second_parts) > 1:
# "Z" indicates Zulu time(widely used in aviation) - Which is
# UTC timezone that currently cudf only supports. Having any other
# unsuppported timezone will let the code fail below
# unsupported timezone will let the code fail below
# with a ValueError.
second_parts.remove("Z")
second_part = "".join(second_parts[1:])
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def binary_operator(self, op, other, reflect=False):
if reflect:
self, other = other, self

# Binary Arithmatics between decimal columns. `Scale` and `precision`
# Binary Arithmetics between decimal columns. `Scale` and `precision`
# are computed outside of libcudf
if op in ("add", "sub", "mul", "div"):
scale = _binop_scale(self.dtype, other.dtype, op)
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6368,7 +6368,7 @@ def wrapper(self, other, axis="columns", level=None, fill_value=None):
# __wrapped__ attributes to `wrapped_func`. Cpython looks up the signature
# string of a function by recursively delving into __wrapped__ until
# it hits the first function that has __signature__ attribute set. To make
# the signature stirng of `wrapper` matches with its actual parameter list,
# the signature string of `wrapper` matches with its actual parameter list,
# we directly set the __signature__ attribute of `wrapper` below.

new_sig = inspect.signature(
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


# The three functions below return the quantiles [25%, 50%, 75%]
# respectively, which are called in the describe() method to ouput
# respectively, which are called in the describe() method to output
# the summary stats of a GroupBy object
def _quantile_25(x):
return x.quantile(0.25)
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def _union(self, other, sort=None):
else:
return result

# If all the above optimizations don't cater to the inpputs,
# If all the above optimizations don't cater to the inputs,
# we materialize RangeIndex's into `Int64Index` and
# then perform `union`.
return Int64Index(self._values)._union(other, sort=sort)
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/multiindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ def _concat(cls, objs):

source_data = [o.to_frame(index=False) for o in objs]

# TODO: Verify if this is really necesary or if we can rely on
# TODO: Verify if this is really necessary or if we can rely on
# DataFrame._concat.
if len(source_data) > 1:
colnames = source_data[0].columns
Expand Down
8 changes: 4 additions & 4 deletions python/cudf/cudf/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2916,7 +2916,7 @@ def unique(self):

def nunique(self, method="sort", dropna=True):
"""Returns the number of unique values of the Series: approximate version,
and exact version to be moved to libgdf
and exact version to be moved to libcudf
Excludes NA values by default.
Expand Down Expand Up @@ -2985,7 +2985,7 @@ def value_counts(
Returns
-------
result : Series contanining counts of unique values.
result : Series containing counts of unique values.
See also
--------
Expand Down Expand Up @@ -3802,7 +3802,7 @@ def wrapper(self, other, level=None, fill_value=None, axis=0):
# __wrapped__ attributes to `wrapped_func`. Cpython looks up the signature
# string of a function by recursively delving into __wrapped__ until
# it hits the first function that has __signature__ attribute set. To make
# the signature stirng of `wrapper` matches with its actual parameter list,
# the signature string of `wrapper` matches with its actual parameter list,
# we directly set the __signature__ attribute of `wrapper` below.

new_sig = inspect.signature(
Expand Down Expand Up @@ -4989,7 +4989,7 @@ def _align_indices(series_list, how="outer", allow_non_unique=False):
def isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):
"""Returns a boolean array where two arrays are equal within a tolerance.
Two values in ``a`` and ``b`` are considiered equal when the following
Two values in ``a`` and ``b`` are considered equal when the following
equation is satisfied.
.. math::
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/udf/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def compile_or_get(frame, func, args):
Return a compiled kernel in terms of MaskedTypes that launches a
kernel equivalent of `f` for the dtypes of `df`. The kernel uses
a thread for each row and calls `f` using that rows data / mask
to produce an output value and output valdity for each row.
to produce an output value and output validity for each row.
If the UDF has already been compiled for this requested dtypes,
a cached version will be returned instead of running compilation.
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/udf/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def unify(self, context, other):
"""
Often within a UDF an instance arises where a variable could
be a `MaskedType`, an `NAType`, or a literal based off
the data at runtime, for examplem the variable `ret` here:
the data at runtime, for example the variable `ret` here:
def f(x):
if x == 1:
Expand Down Expand Up @@ -185,7 +185,7 @@ class NAType(types.Type):
"""
A type for handling ops against nulls
Exists so we can:
1. Teach numba that all occurances of `cudf.NA` are
1. Teach numba that all occurrences of `cudf.NA` are
to be read as instances of this type instead
2. Define ops like `if x is cudf.NA` where `x` is of
type `Masked` to mean `if x.valid is False`
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/testing/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def assert_series_equal(
Whether to check the Index class, dtype and inferred_type
are identical.
check_series_type : bool, default True
Whether to check the seires class, dtype and
Whether to check the series class, dtype and
inferred_type are identical. Currently it is idle,
and similar to pandas.
check_less_precise : bool or int, default False
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/tests/test_binops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ def make_scalar_product_data():
)
)

# we can muliply any timedelta by any int, or bool
# we can multiply any timedelta by any int, or bool
valid |= set(product(TIMEDELTA_TYPES, INTEGER_TYPES | BOOL_TYPES))

# we can multiply a float by any int, float, or bool
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/tests/test_custom_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_dataframe_accessor(gdf):
"gdf2", [gd.datasets.randomdata(nrows=1, dtypes={"x": int, "y": int})]
)
def test_dataframe_accessor_idendity(gdf1, gdf2):
"""Test for accessor idendities
"""Test for accessor identities
- An object should hold persistent reference to the same accessor
- Different objects should hold difference instances of the accessor
"""
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/tests/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def test_dt_ops(data):
assert_eq(pd_data > pd_data, gdf_data > gdf_data)


# libgdf doesn't respect timezones
# licudf doesn't respect timezones
@pytest.mark.parametrize("data", [data1()])
@pytest.mark.parametrize("field", fields)
def test_dt_series(data, field):
Expand Down
10 changes: 5 additions & 5 deletions python/cudf/cudf/tests/test_multiindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,9 @@ def test_multiindex_copy_sem(data, levels, codes, names):
)
@pytest.mark.parametrize("deep", [True, False])
def test_multiindex_copy_deep(data, deep):
"""Test memory idendity for deep copy
"""Test memory identity for deep copy
Case1: Constructed from GroupBy, StringColumns
Case2: Constrcuted from MultiIndex, NumericColumns
Case2: Constructed from MultiIndex, NumericColumns
"""
same_ref = not deep

Expand Down Expand Up @@ -768,19 +768,19 @@ def test_multiindex_copy_deep(data, deep):
mi1 = data
mi2 = mi1.copy(deep=deep)

# Assert ._levels idendity
# Assert ._levels identity
lptrs = [lv._data._data[None].base_data.ptr for lv in mi1._levels]
rptrs = [lv._data._data[None].base_data.ptr for lv in mi2._levels]

assert all([(x == y) is same_ref for x, y in zip(lptrs, rptrs)])

# Assert ._codes idendity
# Assert ._codes identity
lptrs = [c.base_data.ptr for _, c in mi1._codes._data.items()]
rptrs = [c.base_data.ptr for _, c in mi2._codes._data.items()]

assert all([(x == y) is same_ref for x, y in zip(lptrs, rptrs)])

# Assert ._data idendity
# Assert ._data identity
lptrs = [d.base_data.ptr for _, d in mi1._data.items()]
rptrs = [d.base_data.ptr for _, d in mi2._data.items()]

Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/tests/test_orc.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def test_orc_writer_sliced(tmpdir):
"TestOrcFile.decimal.orc",
"TestOrcFile.decimal.same.values.orc",
"TestOrcFile.decimal.multiple.values.orc",
# For addional information take look at PR 7034
# For additional information take look at PR 7034
"TestOrcFile.decimal.runpos.issue.orc",
],
)
Expand Down Expand Up @@ -541,7 +541,7 @@ def test_orc_decimal_precision_fail(datadir):
assert_eq(pdf, gdf)


# For addional information take look at PR 6636 and 6702
# For additional information take look at PR 6636 and 6702
@pytest.mark.parametrize(
"orc_file",
[
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/utils/gpu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _try_get_old_or_new_symbols():
cuda_driver_supported_rt_version >= 11000
and cuda_runtime_version >= 11000
):
# With cuda enhanced compatibitlity any code compiled
# With cuda enhanced compatibility any code compiled
# with 11.x version of cuda can now run on any
# driver >= 450.80.02. 11000 is the minimum cuda
# version 450.80.02 supports.
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/utils/ioutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@
should consume messages from. Valid values are 0 - (N-1)
start_offset : int, Kafka Topic/Partition offset that consumption
should begin at. Inclusive.
end_offset : int, Kafka Topic/Parition offset that consumption
end_offset : int, Kafka Topic/Partition offset that consumption
should end at. Inclusive.
batch_timeout : int, default 10000
Maximum number of milliseconds that will be spent trying to
Expand All @@ -1055,7 +1055,7 @@
or any object with a `read()` method (such as builtin `open()` file handler
function or `StringIO`).
delimiter : string, default None, The delimiter that should be used
for splitting text chunks into seperate cudf column rows. Currently
for splitting text chunks into separate cudf column rows. Currently
only a single delimiter is supported.
Returns
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def get_appropriate_dispatched_func(

elif hasattr(cupy_submodule, fname):
cupy_func = getattr(cupy_submodule, fname)
# Handle case if cupy impliments it as a numpy function
# Handle case if cupy implements it as a numpy function
# Unsure if needed
if cupy_func is func:
return NotImplemented
Expand All @@ -374,7 +374,7 @@ def _cast_to_appropriate_cudf_type(val, index=None):
elif (val.ndim == 1) or (val.ndim == 2 and val.shape[1] == 1):
# if index is not None and is of a different length
# than the index, cupy dispatching behaviour is undefined
# so we dont impliment it
# so we don't implement it
if (index is None) or (len(index) == len(val)):
return cudf.Series(val, index=index)

Expand Down
2 changes: 1 addition & 1 deletion python/dask_cudf/dask_cudf/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def render_pep440_old(pieces):
The ".dev0" means dirty.
Eexceptions:
Exceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
if pieces["closest-tag"]:
Expand Down
2 changes: 1 addition & 1 deletion python/dask_cudf/dask_cudf/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def make_meta_object_cudf(x, index=None):
)
elif not hasattr(x, "dtype") and x is not None:
# could be a string, a dtype object, or a python type. Skip `None`,
# because it is implictly converted to `dtype('f8')`, which we don't
# because it is implicitly converted to `dtype('f8')`, which we don't
# want here.
try:
dtype = np.dtype(x)
Expand Down
4 changes: 2 additions & 2 deletions python/dask_cudf/dask_cudf/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _read_paths(
frag = next(ds.get_fragments())
if frag:
# Extract hive-partition keys, and make sure they
# are orderd the same as they are in `partitions`
# are ordered the same as they are in `partitions`
raw_keys = pa_ds._get_partition_keys(frag.partition_expression)
partition_keys = [
(hive_part.name, raw_keys[hive_part.name])
Expand Down Expand Up @@ -173,7 +173,7 @@ def read_partition(

strings_to_cats = kwargs.get("strings_to_categorical", False)

# Assume multi-peice read
# Assume multi-piece read
paths = []
rgs = []
last_partition_keys = None
Expand Down
2 changes: 1 addition & 1 deletion python/dask_cudf/dask_cudf/io/tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def test_chunksize(tmpdir, chunksize, metadata):
# one output partition
assert ddf3.npartitions == 1
else:
# Files can be aggregateed together, but
# Files can be aggregated together, but
# chunksize is not large enough to produce
# a single output partition
assert ddf3.npartitions < num_row_groups
Expand Down

0 comments on commit 4a70ded

Please sign in to comment.