• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dask / dask / 11780
53%

Build:
DEFAULT BRANCH: master
Ran 13 Jun 2019 05:12PM UTC
Jobs 1
Files 111
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
11780

push

travis-ci

jrbourbeau
Drop size 0 arrays in concatenate (#4167)

* Test `da.concatenate` with size 0 array

Make sure that `da.concatenate` does not include empty arrays in the
result as they don't contribute any data.

* Drop size 0 arrays from `da.concatenate`

If any of the arrays passed to `da.concatenate` has a size of 0, then it
won't contribute anything to the array created by concatenation. As such
make sure to drop any size 0 arrays from the sequence of arrays to
concatenate before proceeding.

* Handle dtype and all 0 size case

* Cast inputs with asarray

* Coerce all arrays to concatenate to the same type

* Drop obsoleted type handling code

* Comment on why arrays are being dropped

* Use `np.promote_types` for parity w/old behavior

* Handle endianness during type promotion

* Construct empty array of right type

Avoids the need to cast later and the addition of another node to the
graph.

* Promote types in `concatenate` using `_meta`

There was some left over type promotion code for the arrays to
concatenate using their `dtype`s. However this should now use the
`_meta` information instead since that is available.

* Ensure `concatenate` is working on Dask Arrays

* Raise `ValueError` if `concatenate` gets no arrays

NumPy will raise if no arrays are provided to concatenate as it is
unclear what to do. This adds a similar exception for Dask Arrays. Also
this short circuits handling unusual cases later. Plus raises a clearer
exception than one might see if this weren't raised.

* Test `concatenate` raises when no arrays are given

* Determine the concatenated array's shape

Needed to handle the case where all arrays have trivial shapes.

* Handle special sequence cases together

* Update dask/array/core.py

Co-Authored-By: James Bourbeau <jrbourbeau@users.noreply.github.com>

* Drop outdated comment

* Assume valid `_meta` in `concatenate`

Simplifies the `_meta` handling logic in `concatenate` to... (continued)

18017 of 19838 relevant lines covered (90.82%)

0.91 hits per line

Jobs
ID Job ID Ran Files Coverage
2 11780.2 (PYTHON=3.6 NUMPY=1.15.1 PANDAS=0.23.4 TEST='true' LINT='true' COVERAGE='true' PARALLEL='false' XTRATESTARGS= TEST_IMPORTS='true') 13 Jun 2019 05:12PM UTC 0
90.82
Travis Job 11780.2
Source Files on build 11780
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #11780
  • 66531baf on github
  • Prev Build on master (#11779)
  • Next Build on master (#11785)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc