Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Feature/#336 - Filter numpy array exposed type #768

Merged
merged 11 commits into from
Nov 3, 2023
3 changes: 3 additions & 0 deletions src/taipy/core/_entity/_migrate/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __search_parent_ids(entity_id: str, data: Dict) -> List:
if entity_type == "TASK" and "SCENARIO" in _id:
if entity_id in entity_data["tasks"]:
parents.append(_id)
parents.sort()
return parents


Expand All @@ -68,6 +69,8 @@ def __search_parent_config(entity_id: str, config: Dict, entity_type: str) -> Li
if entity_type == "TASK" and possible_parents == "SCENARIO":
if section_id in entity_data["tasks"]:
parents.append(section_id)

parents.sort()
return parents


Expand Down
3 changes: 2 additions & 1 deletion src/taipy/core/data/_abstract_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from typing import Dict, List, Optional, Set

import modin.pandas as modin_pd
import numpy as np
import pandas as pd
from sqlalchemy import create_engine, text

Expand Down Expand Up @@ -214,7 +215,7 @@ def _read_as(self):
query_result = connection.execute(text(self._get_read_query()))
return list(map(lambda row: custom_class(**row), query_result))

def _read_as_numpy(self):
def _read_as_numpy(self) -> np.ndarray:
return self._read_as_pandas_dataframe().to_numpy()

def _read_as_pandas_dataframe(self, columns: Optional[List[str]] = None):
Expand Down
Loading
Loading