Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impl] pass through blocks #56

Open
4 tasks
Tracked by #58 ...
DrCatman opened this issue Feb 1, 2023 · 1 comment
Open
4 tasks
Tracked by #58 ...

[Impl] pass through blocks #56

DrCatman opened this issue Feb 1, 2023 · 1 comment
Assignees
Milestone

Comments

@DrCatman
Copy link
Member

DrCatman commented Feb 1, 2023

pass in a space and non-negative integer

domain: space
co-domain: same space, n copies

  • deadend
    • 0: empty
    • bookkeeps a nothing
  • identity
    • 1: itself
  • splitter
    • 2
  • broadcast
    • 3: n
@mzargham
Copy link
Collaborator

mzargham commented Mar 10, 2023

from cadcad.blocks import deadend, indentity

deadend

annotations

def deadend(domain:List[Space], n_terminals=1:int )-> Block:

use

myblock = deadend([Real])

expected

myblock.domain = domain #input argument
myblock.codomain = [EmptySpace for _ in range(n_terminals)]

identity (and related broadcast block)

annotations

def identity(domain:List[Space], n_terminals=1:int )-> Block:

use

myblock = identity([Real])

expected

myblock.domain = domain #input argument
myblock.codomain = [Real for _ in range(n_terminals)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants