home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

1 row where issue = 1609090149 and user = 127195910 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • Karimat22 · 1 ✖

issue 1

  • `np.multiply` and `dask.array.multiply` trigger graph computation vs using `+` and `*` operators. · 1 ✖

author_association 1

  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1460859657 https://github.com/pydata/xarray/issues/7584#issuecomment-1460859657 https://api.github.com/repos/pydata/xarray/issues/7584 IC_kwDOAMm_X85XEvMJ Karimat22 127195910 2023-03-08T20:51:15Z 2023-04-29T03:41:57Z NONE

When using NumPy arrays, the np.multiply() function and the * operator behave the same way and perform element-wise multiplication on the arrays. Similarly, the np.add() function and the + operator perform element-wise addition.

However, when using Dask arrays, there is a difference between using the * and + operators and using the dask.array.multiply() and dask.array.add() functions. This is because Dask arrays are lazy and do not compute the result of an operation until it is explicitly requested. When you use the * or + operators, Dask constructs a task graph that describes the computation, but does not actually execute it until you explicitly call a computation method like dask.compute() or dask.persist().

On the other hand, when you use the dask.array.multiply() or dask.array.add() functions, Dask immediately constructs a task graph and adds it to the computation graph, triggering the computation to begin.

Here's an example to illustrate the difference:

import dask.array as da

x = da.ones((1000, 1000), chunks=(100, 100)) y = da.ones((1000, 1000), chunks=(100, 100))

using the * operator

z = x * y

no computation is triggered yet

using dask.array.multiply()

z = da.multiply(x, y)

computation is immediately triggered

In this example, the * operator creates a task graph for the multiplication but does not execute it, whereas the dask.array.multiply() function immediately adds the task graph to the computation graph and triggers the computation to begin.

It's worth noting that using the * and + operators can be more convenient and can lead to cleaner code, especially for simple operations. However, if you need more control over when computations are executed or want to avoid unnecessary computations, you should use the dask.array.multiply() and dask.array.add() functions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `np.multiply` and `dask.array.multiply` trigger graph computation vs using `+` and `*` operators. 1609090149

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 12.205ms · About: xarray-datasette