← 返回首页
fix: handle empty numpy arrays in scalar proto conversion during materialization by psaikaushik · Pull Request #6267 · feast-dev/feast · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

fix: handle empty numpy arrays in scalar proto conversion during materialization#6267

Closed
psaikaushik wants to merge 1 commit into
feast-dev:masterfrom
psaikaushik:fix/6255-empty-numpy-array-materialization
Closed

fix: handle empty numpy arrays in scalar proto conversion during materialization#6267
psaikaushik wants to merge 1 commit into
feast-dev:masterfrom
psaikaushik:fix/6255-empty-numpy-array-materialization

Conversation

Copy link
Copy Markdown

psaikaushik commented Apr 12, 2026
edited
Loading

Closing — this is a duplicate of #6259 which was already opened by the issue author. Apologies for the noise.

When a scalar feature column contains an empty numpy array (np.array([])), pd.isnull() returns an array instead of a scalar bool. Applying Python's `not` operator to that array raises: ValueError: The truth value of an empty array is ambiguous. This adds a safe null-check helper (is_scalar_null) that handles array-like values before falling through to pd.isnull(). Empty arrays are treated as null values, consistent with None and np.nan. The helper is used in _convert_scalar_values_to_proto to replace the bare `pd.isnull()` calls that crash on array inputs. Closes feast-dev#6255
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Footer

© 2026 GitHub, Inc.