Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcdonald3 committed Jun 14, 2023
1 parent c5886dd commit 5276ae3
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 44 deletions.
1 change: 1 addition & 0 deletions arkouda/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2687,6 +2687,7 @@ def invert_permutation(perm):
raise ValueError("The array is not a permutation.")
return coargsort([perm, arange(perm.size)])


def receive_dataframe(hostname : str, port):
"""
Receive a pdarray sent by `pdarray.send_array()`.
Expand Down
4 changes: 2 additions & 2 deletions arkouda/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1913,6 +1913,7 @@ def read_tagged_data(
else:
raise RuntimeError(f"Invalid File Type detected, {ftype}")


def receive_array(hostname : str, port):
"""
Receive a pdarray sent by `pdarray.send_array()`.
Expand Down Expand Up @@ -1948,7 +1949,6 @@ def receive_array(hostname : str, port):
a supported dtype
"""
rep_msg = generic_msg(cmd="receiveArray", args={"hostname": hostname,
"port" : port})
"port" : port})
rep = json.loads(rep_msg)
return _build_objects(rep)

7 changes: 3 additions & 4 deletions arkouda/segarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from arkouda.client import generic_msg
from arkouda.dtypes import bool as akbool
from arkouda.dtypes import int64 as akint64
from arkouda.dtypes import isSupportedInt, str_
from arkouda.dtypes import isSupportedInt, str_, int_scalars
from arkouda.groupbyclass import GroupBy, broadcast
from arkouda.logger import getArkoudaLogger
from arkouda.numeric import cumsum
Expand Down Expand Up @@ -1571,7 +1571,7 @@ def is_registered(self) -> bool:
def send_array(self, hostname: str, port: int_scalars):
"""
Sends a pdarray to a different Arkouda server
Parameters
----------
hostname : str
Expand All @@ -1588,7 +1588,6 @@ def send_array(self, hostname: str, port: int_scalars):
This port much match the port passed to the call to
`ak.receive_array()`.
Returns
-------
None
Expand All @@ -1602,7 +1601,7 @@ def send_array(self, hostname: str, port: int_scalars):
a supported dtype
"""
return generic_msg(cmd="sendArray", args={"segments": self.segments,
"values": self.vales,
"values": self.values,
"hostname": hostname,
"port": port,
"dtype": self.dtype,
Expand Down
74 changes: 37 additions & 37 deletions arkouda/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2428,40 +2428,40 @@ def unregister_strings_by_name(user_defined_name: str) -> None:
unregister_pdarray_by_name(user_defined_name)

def send_array(self, hostname: str, port: int_scalars):
"""
Sends a strings object to a different Arkouda server
Parameters
----------
hostname : str
The hostname of the pdarray to receive the array
port : int_scalars
The port to send the array over. This needs to be an
open port (i.e., not one that the Arkouda server is
running on). This will open up `numLocales` ports,
each of which in succession, so will use ports of the
range {port..(port+numLocales)} (e.g., running an
Arkouda server of 4 nodes, port 1234 is passed as
`port`, Arkouda will use ports 1234, 1235, 1236,
and 1237 to send the array data).
This port much match the port passed to the call to
`ak.receive_array()`.
Returns
-------
None
Raises
------
ValueError
Raised if the op is not within the pdarray.BinOps set
TypeError
Raised if other is not a pdarray or the pdarray.dtype is not
a supported dtype
"""
# hostname is the hostname to send to
return generic_msg(cmd="sendArray", args={"values": self.entry,
"hostname": hostname,
"port": port,
"objType": "strings"})
"""
Sends a strings object to a different Arkouda server
Parameters
----------
hostname : str
The hostname of the pdarray to receive the array
port : int_scalars
The port to send the array over. This needs to be an
open port (i.e., not one that the Arkouda server is
running on). This will open up `numLocales` ports,
each of which in succession, so will use ports of the
range {port..(port+numLocales)} (e.g., running an
Arkouda server of 4 nodes, port 1234 is passed as
`port`, Arkouda will use ports 1234, 1235, 1236,
and 1237 to send the array data).
This port much match the port passed to the call to
`ak.receive_array()`.
Returns
-------
None
Raises
------
ValueError
Raised if the op is not within the pdarray.BinOps set
TypeError
Raised if other is not a pdarray or the pdarray.dtype is not
a supported dtype
"""
# hostname is the hostname to send to
return generic_msg(cmd="sendArray", args={"values": self.entry,
"hostname": hostname,
"port": port,
"objType": "strings"})
2 changes: 1 addition & 1 deletion src/GenSymIO.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ module GenSymIO {
}
}

proc _buildReadAllMsgJson(rnames:list((string, ObjType, string),false), allowErrors:bool, fileErrorCount:int, fileErrors:list(string,false), st: borrowed SymTab): string throws {
proc _buildReadAllMsgJson(rnames:list((string, ObjType, string)), allowErrors:bool, fileErrorCount:int, fileErrors:list(string,false), st: borrowed SymTab): string throws {
var items: list(map(string, string));

for rname in rnames {
Expand Down

0 comments on commit 5276ae3

Please sign in to comment.