Baunsgaard commented on a change in pull request #892:
URL: https://github.com/apache/systemml/pull/892#discussion_r415304586



##########
File path: src/main/python/systemds/context/systemds_context.py
##########
@@ -164,4 +164,14 @@ def rand(self, rows: int, cols: int, min: Union[float, 
int] = None,
         :param lambd: lamda value for "poison" distribution
         :return:
         """
+        available_pdfs = ["uniform", "normal", "poisson"]
+        if rows < 0:
+            raise ValueError("In rand statement, can only assign rows a long 
(integer) value >= 0 "
+                            "-- attempted to assign value: {r}".format(r=rows))
+        if cols < 0:
+            raise ValueError("In rand statement, can only assign cols a long 
(integer) value >= 0 "

Review comment:
       Just to finish this thread, you have done the correct thing! :100:, I 
did not consider that it is useful to make code that have a 0x0 matrix to start 
with, and then add columns and rows to that, iteratively.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to