Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct grammar #2365

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pymilvus/client/entity_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def convert_to_str_array(orig_str_arr: Any, field_info: Dict, check: bool = True
for s in arr:
if not isinstance(s, str):
raise ParamError(
message=f"field ({field_info['name']}) expect string input, got: {type(s)}"
message=f"field ({field_info['name']}) expects string input, got: {type(s)}"
)
if len(s) > max_len:
raise ParamError(
Expand Down Expand Up @@ -198,7 +198,7 @@ def convert_to_json_arr(objs: List[object], field_info: Any):
arr = []
for obj in objs:
if obj is None:
raise ParamError(message=f"field ({field_info['name']}) expect not None input")
raise ParamError(message=f"field ({field_info['name']}) expects a non-None input")
arr.append(convert_to_json(obj))
return arr

Expand Down Expand Up @@ -308,7 +308,7 @@ def pack_field_value_to_field_data(
if isinstance(field_value, np.ndarray):
if field_value.dtype not in ("float32", "float64"):
raise ParamError(
message="invalid input for float32 vector, expect np.ndarray with dtype=float32"
message="invalid input for float32 vector. Expected an np.ndarray with dtype=float32"
)
f_value = field_value.tolist()

Expand All @@ -335,12 +335,12 @@ def pack_field_value_to_field_data(
elif isinstance(field_value, np.ndarray):
if field_value.dtype != "float16":
raise ParamError(
message="invalid input for float16 vector, expect np.ndarray with dtype=float16"
message="invalid input for float16 vector. Expected an np.ndarray with dtype=float16"
)
v_bytes = field_value.view(np.uint8).tobytes()
else:
raise ParamError(
message="invalid input type for float16 vector, expect np.ndarray with dtype=float16"
message="invalid input type for float16 vector. Expected an np.ndarray with dtype=float16"
)

field_data.vectors.dim = len(v_bytes) // 2
Expand All @@ -357,12 +357,12 @@ def pack_field_value_to_field_data(
elif isinstance(field_value, np.ndarray):
if field_value.dtype != "bfloat16":
raise ParamError(
message="invalid input for bfloat16 vector, expect np.ndarray with dtype=bfloat16"
message="invalid input for bfloat16 vector. Expected an np.ndarray with dtype=bfloat16"
)
v_bytes = field_value.view(np.uint8).tobytes()
else:
raise ParamError(
message="invalid input type for bfloat16 vector, expect np.ndarray with dtype=bfloat16"
message="invalid input type for bfloat16 vector. Expected an np.ndarray with dtype=bfloat16"
)

field_data.vectors.dim = len(v_bytes) // 2
Expand Down