GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Computation between scalars · Issue #199 · python-graphblas/python-graphblas

Computation between scalars #199

New issue
Copy link
New issue
Copy link
Closed
#358
Closed
Computation between scalars#199
#358
Copy link
Assignees
eriknw
Labels
discussionDiscussing a topic with no specific actions yetDiscussing a topic with no specific actions yetfeatureSomething is missingSomething is missing

Description

@eriknw
eriknw
opened on Apr 5, 2022
Issue body actions

I find it super-annoying that we're unable to use our operators to operate on scalars. Should we support ewise_add, ewise_mult, ewise_union, and apply on scalars? Also, support normal infix rules, such as s + 1. But, should these return expressions? Do we even dare to consider masking?

We can do this. We can use s._as_vector() to efficiently do this on GrB Scalars in SuiteSparse:GraphBLAS (other scalars would incur a copy into a new size 1 Vector).

Activity

  1. eriknw
    added
    discussionDiscussing a topic with no specific actions yetDiscussing a topic with no specific actions yet
    featureSomething is missingSomething is missing
    on Apr 5, 2022
  2. eriknw commented on May 19, 2022

    @eriknw
    eriknw
    on May 19, 2022
    MemberAuthor
    More actions

    I think a big selling point for doing this is to allow users to more easily see what operators do. For example, unary.exp(1) or binary.plus(1, 2).

  3. jim22k commented on May 21, 2022

    @jim22k
    jim22k
    on May 21, 2022
    Member
    More actions

    Yes, let's do this.

  4. eriknw commented on Nov 24, 2022

    @eriknw
    eriknw
    on Nov 24, 2022
    MemberAuthor
    More actions

    Given scalars s and t, I think we can support multiple syntaxes:

    • binary.plus(s | t)
    • binary.plus(s | t, left_default=10, right_default=10)
    • binary.plus(s & t)
    • binary.plus(s, t) # same as binary.plus(s & t)
      • This is important to support for operating on Python scalars
    • and as methods e.g. s.ewise_mult(t, "+")

    I don't think masks make sense (for now). We may be able to support s.select where the first index is always 0 (mathematically, it's probably more correct to have no indices at all).

  5. eriknw
    self-assigned this
    on Nov 28, 2022
  6. eriknw
    closed this as completedin #358on Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @eriknw
    eriknw

Labels

discussionDiscussing a topic with no specific actions yetDiscussing a topic with no specific actions yetfeatureSomething is missingSomething is missing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.