Skip to content

Commit

Permalink
Don't export reindex and substrides (#31201)
Browse files Browse the repository at this point in the history
* Don't export `reindex`

It was inadvertently exported by #30789.  It's tailored to `SubArray` and doesn't check for preconditions that are enforced by the `SubArray` constructor — so while we could export it, I'd like to do so intentionally and add friendlier errors for violations of these preconditions.

* Same deal for `substrides`
  • Loading branch information
mbauman authored and fredrikekre committed Mar 1, 2019
1 parent ef1f981 commit 9329e0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ function promote_eltype_op end
# @deprecate one(i::CartesianIndex) oneunit(i)
# @deprecate one(::Type{I}) where I<:CartesianIndex oneunit(I)

@deprecate reindex(V, idxs, subidxs) reindex(idxs, subidxs)
@deprecate substrides(parent::AbstractArray, strds::Tuple, I::Tuple) substrides(strds, I)
@deprecate reindex(V, idxs, subidxs) reindex(idxs, subidxs) false
@deprecate substrides(parent::AbstractArray, strds::Tuple, I::Tuple) substrides(strds, I) false

# TODO: deprecate these
one(::CartesianIndex{N}) where {N} = one(CartesianIndex{N})
Expand Down

0 comments on commit 9329e0f

Please sign in to comment.