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

fix: remove recycling of logical vectors when indexing into edge/vertex selectors #1731

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

schochastics
Copy link
Contributor

Fix #848

Did not remove recycling for length 1 vectors because that still makes sense in my opinion

pkgload::load_all("~/git/R_packages/rigraph/")
#> ℹ Loading igraph
g <- make_ring(5)
V(g)[c(TRUE, FALSE)]
#> Error in `FUN()`:
#> ! Error: Logical index length does not match the number of vertices.
#>   Recycling is not allowed.
E(g)[c(TRUE, FALSE)]
#> Error in `FUN()`:
#> ! Error: Logical index length does not match the number of edges.
#>   Recycling is not allowed.

V(g)[TRUE]
#> + 5/5 vertices, from bafeef3:
#> [1] 1 2 3 4 5
E(g)[FALSE]
#> + 0/5 edges from bafeef3:

Created on 2025-03-03 with reprex v2.1.1

Copy link
Contributor

aviator-app bot commented Mar 3, 2025

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue label.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

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

Successfully merging this pull request may close these issues.

Do not recycle logical vectors when indexing into edge/vertex selectors
1 participant