Skip to content

Commit 9e76b6e

Browse files
authored
Fix several typos (#44043)
1 parent c30afb2 commit 9e76b6e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

pandas/_libs/groupby.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def group_add(add_t[:, ::1] out,
532532
nobs[lab, j] += 1
533533

534534
if nobs[lab, j] == 1:
535-
# i.e. we havent added anything yet; avoid TypeError
535+
# i.e. we haven't added anything yet; avoid TypeError
536536
# if e.g. val is a str and sumx[lab, j] is 0
537537
t = val
538538
else:
@@ -1193,7 +1193,7 @@ def group_rank(float64_t[:, ::1] out,
11931193
na_option=na_option
11941194
)
11951195
for i in range(len(result)):
1196-
# TODO: why cant we do out[:, k] = result?
1196+
# TODO: why can't we do out[:, k] = result?
11971197
out[i, k] = result[i]
11981198

11991199

pandas/_libs/src/klib/khash.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ khuint32_t PANDAS_INLINE murmur2_32to32(khuint32_t k){
206206
}
207207

208208
// it is possible to have a special x64-version, which would need less operations, but
209-
// using 32bit version always has also some benifits:
209+
// using 32bit version always has also some benefits:
210210
// - one code for 32bit and 64bit builds
211211
// - the same case for 32bit and 64bit builds
212212
// - no performance difference could be measured compared to a possible x64-version

pandas/_libs/src/klib/khash_python.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void traced_free(void* ptr){
7171
// The python 3 hash function has the invariant hash(x) == hash(int(x)) == hash(decimal(x))
7272
// and the size of hash may be different by platform / version (long in py2, Py_ssize_t in py3).
7373
// We don't need those invariants because types will be cast before hashing, and if Py_ssize_t
74-
// is 64 bits the truncation causes collission issues. Given all that, we use our own
74+
// is 64 bits the truncation causes collision issues. Given all that, we use our own
7575
// simple hash, viewing the double bytes as an int64 and using khash's default
7676
// hash for 64 bit integers.
7777
// GH 13436 showed that _Py_HashDouble doesn't work well with khash
@@ -338,13 +338,13 @@ khuint32_t PANDAS_INLINE kh_python_hash_func(PyObject* key) {
338338
// are possible
339339
if (PyFloat_CheckExact(key)) {
340340
// we cannot use kh_float64_hash_func
341-
// becase float(k) == k holds for any int-object k
341+
// because float(k) == k holds for any int-object k
342342
// and kh_float64_hash_func doesn't respect it
343343
hash = floatobject_hash((PyFloatObject*)key);
344344
}
345345
else if (PyComplex_CheckExact(key)) {
346346
// we cannot use kh_complex128_hash_func
347-
// becase complex(k,0) == k holds for any int-object k
347+
// because complex(k,0) == k holds for any int-object k
348348
// and kh_complex128_hash_func doesn't respect it
349349
hash = complexobject_hash((PyComplexObject*)key);
350350
}

pandas/_libs/tslibs/src/datetime/np_datetime_strings.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
402402
}
403403

404404
parse_timezone:
405-
/* trim any whitepsace between time/timeezone */
405+
/* trim any whitespace between time/timeezone */
406406
while (sublen > 0 && isspace(*substr)) {
407407
++substr;
408408
--sublen;

pandas/_libs/tslibs/timezones.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ cdef object get_dst_info(tzinfo tz):
257257
ndarray[int64_t]
258258
Nanosecond UTC offsets corresponding to DST transitions.
259259
str
260-
Desscribing the type of tzinfo object.
260+
Describing the type of tzinfo object.
261261
"""
262262
cache_key = tz_cache_key(tz)
263263
if cache_key is None:

0 commit comments

Comments
 (0)