Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into teh-jn/lazydotfuse
Browse files Browse the repository at this point in the history
* origin/master: (23 commits)
  fix deprecations of \cdot and \times (#26884)
  Support reshaping custom 0-dimensional arrays (#26870)
  fix some cases of dot syntax lowering (#26878)
  Pkg3: deterministically close the LibGit2 repo in tests (#26883)
  code loading docs: add missing graph edge (#26874)
  add news for #26858 and #26859 [ci skip] (#26869)
  Deprecate using && and || within at-dot expressions (#26792)
  widen `Int8` and `Int16` to `Int` instead of `Int32` (#26859)
  fix #26038, make `isequal` consistent with `hash` for `Ptr` (#26858)
  Deprecate variadic size(A, dim1, dim2, dims...) method (#26862)
  add using Random to example in manual (#26864)
  warn once instead of depwarn since we want to test it
  Revert "reserve syntax that could be used for computed field types (#18466) (#26816)" (#26857)
  Fix compilation on LLVM 6.0
  change promotion behaviour of `cumsum` and `cumsum!` to match `sum`
  [LLVM 6] add patch to diamond if-conversion
  add a precompile command that can be used to precompile all dependencies (#254)
  use registry if no version entry exist in project for developed pacakges
  make Pkg3 work as a drop in for the old CI scripts
  update registries when adding (#253)
  ...
  • Loading branch information
mbauman committed Apr 23, 2018
2 parents c8bb374 + 692408c commit 110a0a5
Show file tree
Hide file tree
Showing 38 changed files with 958 additions and 498 deletions.
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@ This section lists changes that do not have deprecation warnings.
* `parse(::Type, ::Char)` now uses a default base of 10, like other number parsing
methods, instead of 36 ([#26576]).

* `isequal` for `Ptr`s now compares element types; `==` still compares only addresses
([#26858]).

* `widen` on 8- and 16-bit integer types now widens to the platform word size (`Int`)
instead of to a 32-bit type ([#26859]).

Library improvements
--------------------

Expand Down Expand Up @@ -777,6 +783,9 @@ Deprecated or removed
`AbstractUnitRange`s are accepted as arguments. Instead, convert the arguments before
calling `ones` or `zeros` ([#26733]).

* The variadic `size(A, dim1, dim2, dims...)` method to return a tuple of multiple
dimension lengths of `A` has been deprecated ([#26862]).

* The `Operators` module is deprecated. Instead, import required operators explicitly
from `Base`, e.g. `import Base: +, -, *, /` ([#22251]).

Expand Down
9 changes: 3 additions & 6 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ end
end

"""
size(A::AbstractArray, [dim...])
size(A::AbstractArray, [dim])
Return a tuple containing the dimensions of `A`. Optionally you can specify the
dimension(s) you want the length of, and get the length of that dimension, or a tuple of the
lengths of dimensions you asked for.
Return a tuple containing the dimensions of `A`. Optionally you can specify a
dimension to just get the length of that dimension.
Note that `size` may not be defined for arrays with non-standard indices, in which case [`axes`](@ref)
may be useful. See the manual chapter on [arrays with custom indices](@ref man-custom-indices).
Expand All @@ -45,8 +44,6 @@ julia> size(A, 3, 2)
```
"""
size(t::AbstractArray{T,N}, d) where {T,N} = d <= N ? size(t)[d] : 1
size(x, d1::Integer, d2::Integer, dx::Vararg{Integer, N}) where {N} =
(size(x, d1), size(x, d2), ntuple(k->size(x, dx[k]), Val(N))...)

"""
axes(A, d)
Expand Down
Loading

0 comments on commit 110a0a5

Please sign in to comment.