home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 403467195

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
403467195 MDU6SXNzdWU0MDM0NjcxOTU= 2717 Test failures with pandas 0.24.0 1217238 closed 0     0 2019-01-26T18:16:15Z 2019-01-27T21:02:03Z 2019-01-27T21:02:03Z MEMBER      

From a recent build on Travis-CI: ``` =================================== FAILURES =================================== ___ test_cf_timedelta[timedeltas7-days-nan] ______ timedeltas = numpy.datetime64('NaT'), units = 'days', numbers = array(nan) @pytest.mark.parametrize( ['timedeltas', 'units', 'numbers'], [('1D', 'days', np.int64(1)), (['1D', '2D', '3D'], 'days', np.array([1, 2, 3], 'int64')), ('1h', 'hours', np.int64(1)), ('1ms', 'milliseconds', np.int64(1)), ('1us', 'microseconds', np.int64(1)), (['NaT', '0s', '1s'], None, [np.nan, 0, 1]), (['30m', '60m'], 'hours', [0.5, 1.0]), (np.timedelta64('NaT', 'ns'), 'days', np.nan), (['NaT', 'NaT'], 'days', [np.nan, np.nan])]) def test_cf_timedelta(timedeltas, units, numbers): timedeltas = pd.to_timedelta(timedeltas, box=False) numbers = np.array(numbers)

    expected = numbers
  actual, _ = coding.times.encode_cf_timedelta(timedeltas, units)

xarray/tests/test_coding_times.py:550:


timedeltas = numpy.datetime64('NaT'), units = 'days' def encode_cf_timedelta(timedeltas, units=None): if units is None: units = infer_timedelta_units(timedeltas)

    np_unit = _netcdf_to_numpy_timeunit(units)
  num = 1.0 * timedeltas / np.timedelta64(1, np_unit)

E TypeError: ufunc multiply cannot use operands with types dtype('float64') and dtype('<M8[ns]') xarray/coding/times.py:379: TypeError ___ TestDataArray.test_struct_array_dims ___ self = <xarray.tests.test_dataarray.TestDataArray object at 0x7fb508944a90> def test_struct_array_dims(self): """ This test checks subraction of two DataArrays for the case when dimension is a structured array. """ # GH837, GH861 # checking array subraction when dims are the same p_data = np.array([('John', 180), ('Stacy', 150), ('Dick', 200)], dtype=[('name', '|S256'), ('height', object)])

    p_data_1 = np.array([('John', 180), ('Stacy', 150), ('Dick', 200)],
                        dtype=[('name', '|S256'), ('height', object)])

    p_data_2 = np.array([('John', 180), ('Dick', 200)],
                        dtype=[('name', '|S256'), ('height', object)])

    weights_0 = DataArray([80, 56, 120], dims=['participant'],
                          coords={'participant': p_data})

    weights_1 = DataArray([81, 52, 115], dims=['participant'],
                          coords={'participant': p_data_1})

    actual = weights_1 - weights_0

    expected = DataArray([1, -4, -5], dims=['participant'],
                         coords={'participant': p_data})

    assert_identical(actual, expected)

    # checking array subraction when dims are not the same
    p_data_1 = np.array([('John', 180), ('Stacy', 151), ('Dick', 200)],
                        dtype=[('name', '|S256'), ('height', object)])

    weights_1 = DataArray([81, 52, 115], dims=['participant'],
                          coords={'participant': p_data_1})

    actual = weights_1 - weights_0

    expected = DataArray([1, -5], dims=['participant'],
                         coords={'participant': p_data_2})
  assert_identical(actual, expected)

E AssertionError: Left and right DataArray objects are not identical E
E Differing values: E L E array([-5, 1]) E R E array([ 1, -5]) E Differing coordinates: E L * participant (participant) object (b'Dick', 200) (b'John', 180) E R * participant (participant) [('name', 'S256'), ('height', 'O')] (b'John', 180) (b'Dick', 200) ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2717/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 0.967ms · About: xarray-datasette