diff --git a/neo/core/spiketrain.py b/neo/core/spiketrain.py
index d863abb9..20a87594 100644
--- a/neo/core/spiketrain.py
+++ b/neo/core/spiketrain.py
@@ -38,10 +38,13 @@ def check_has_dimensions_time(*values):
     '''
     errmsgs = []
     for value in values:
-        dim = value.dimensionality
-        if (len(dim) != 1 or list(dim.values())[0] != 1 or not isinstance(list(dim.keys())[0],
-                                                                          pq.UnitTime)):
-            errmsgs.append("value {} has dimensions {}, not [time]".format(value, dim.simplified))
+        dim = value.dimensionality.simplified
+        if (len(dim) != 1 or
+                list(dim.values())[0] != 1 or not
+                isinstance(list(dim.keys())[0], pq.UnitTime)):
+            errmsgs.append(
+                "value {} has dimensions {}, not [time]".format(
+                    value, dim))
     if errmsgs:
         raise ValueError("\n".join(errmsgs))
 

Regression in the `check_has_dimensions_time` method of the SpikeTrain class for Compound Units
Regression in the `check_has_dimensions_time` method of the SpikeTrain class.

Calling
`neo.SpikeTrain([1,2,3]*pq.CompoundUnit("1/10*s"), t_start=0*pq.ms, t_stop=10000*pq.s)-5*pq.CompoundUnit("1/100*s")`
used to issue
`ValueError: value 5.0 has dimensions s, not [time]`
due to an incorrect handling of CompoundUnits -- these need to be simplified first in order to check consistency.

This fixes the issue by an additional simplified statement, making the above statement return
`<SpikeTrain(array([0.5, 1.5, 2.5]) * (1/10*s), [-0.49999999999999994 (1/10*s), 99999.5 (1/10*s)])>`

diff --git a/neo/test/coretest/test_spiketrain.py b/neo/test/coretest/test_spiketrain.py
index b089ea24..325f9bc3 100644
--- a/neo/test/coretest/test_spiketrain.py
+++ b/neo/test/coretest/test_spiketrain.py
@@ -143,6 +143,12 @@ class Testcheck_has_dimensions_time(unittest.TestCase):
         check_has_dimensions_time(d)
         self.assertRaises(ValueError, check_has_dimensions_time, a, b, c, d)
 
+    # Regression test for #763
+    # This test ensures the function works for compound units
+    def test__check_has_dimensions_time_compound_unit(self):
+        a = np.arange(3) * pq.CompoundUnit("1/10*s")
+        check_has_dimensions_time(a)
+
 
 class Testcheck_time_in_range(unittest.TestCase):
     def test__check_time_in_range_empty_array(self):

pip install -e .[all]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
importlib-metadata==4.8.3
iniconfig==1.1.1
-e git+https://github.com/NeuralEnsemble/python-neo.git@03bef5fe3f654df24e8f66ee3d07fc6aabef6479#egg=neo
nose==1.3.7
numpy==1.19.5
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
quantities==0.13.0
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: python-neo
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - nose==1.3.7
      - numpy==1.19.5
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - quantities==0.13.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/python-neo

neo/test/coretest/test_spiketrain.py::Testcheck_has_dimensions_time::test__check_has_dimensions_time_compound_unit
neo/test/coretest/test_spiketrain.py::Test__generate_datasets::test__fake_neo__cascade neo/test/coretest/test_spiketrain.py::Test__generate_datasets::test__fake_neo__nocascade neo/test/coretest/test_spiketrain.py::Test__generate_datasets::test__get_fake_values neo/test/coretest/test_spiketrain.py::Testcheck_has_dimensions_time::test__check_has_dimensions_time neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_above neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_above_below neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_above_below_scale neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_above_scale neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_below neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_below_scale neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_empty_array neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_empty_array_invalid_t_stop neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_exact neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_inside neo/test/coretest/test_spiketrain.py::Testcheck_time_in_range::test__check_time_in_range_scale neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_empty neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_empty_no_t_start neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array_no_start_stop_units neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array_no_start_stop_units_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array_no_start_stop_units_with_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array_with_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array_with_incompatible_units_ValueError neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_array_without_units_should_raise_ValueError neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_list neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_list_no_start_stop_units neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_list_no_start_stop_units_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_list_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_list_without_units_should_raise_ValueError neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_no_start_stop_units neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_no_start_stop_units_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_no_start_stop_units_with_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_units neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_units_no_start_stop_units neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_units_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_units_with_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_array_with_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_from_quantity_units_no_start_stop_units_set_dtype neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_minimal neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_with_len_times_different_size_than_waveform_shape1_ValueError neo/test/coretest/test_spiketrain.py::TestConstructor::test__create_with_times_outside_tstart_tstop_ValueError neo/test/coretest/test_spiketrain.py::TestConstructor::test_default_tstart neo/test/coretest/test_spiketrain.py::TestConstructor::test_defaults neo/test/coretest/test_spiketrain.py::TestConstructor::test_tstop_units_conversion neo/test/coretest/test_spiketrain.py::TestSorting::test_sort neo/test/coretest/test_spiketrain.py::TestSlice::test_compliant neo/test/coretest/test_spiketrain.py::TestSlice::test_slice neo/test/coretest/test_spiketrain.py::TestSlice::test_slice_from_beginning neo/test/coretest/test_spiketrain.py::TestSlice::test_slice_negative_idxs neo/test/coretest/test_spiketrain.py::TestSlice::test_slice_to_end neo/test/coretest/test_spiketrain.py::TestTimeSlice::test__deepcopy_should_set_parents_objects_to_None neo/test/coretest/test_spiketrain.py::TestTimeSlice::test__time_slice_deepcopy_annotations neo/test/coretest/test_spiketrain.py::TestTimeSlice::test__time_slice_deepcopy_array_annotations neo/test/coretest/test_spiketrain.py::TestTimeSlice::test__time_slice_deepcopy_data neo/test/coretest/test_spiketrain.py::TestTimeSlice::test__time_slice_should_set_parents_to_None neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_compliant neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_differnt_units neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_empty neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_matching_ends neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_none_both neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_none_start neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_none_stop neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_out_of_boundries neo/test/coretest/test_spiketrain.py::TestTimeSlice::test_time_slice_typical neo/test/coretest/test_spiketrain.py::TestTimeShift::test__time_shift_by_zero neo/test/coretest/test_spiketrain.py::TestTimeShift::test__time_shift_different_units neo/test/coretest/test_spiketrain.py::TestTimeShift::test__time_shift_same_annotations neo/test/coretest/test_spiketrain.py::TestTimeShift::test__time_shift_same_array_annotations neo/test/coretest/test_spiketrain.py::TestTimeShift::test__time_shift_same_attributes neo/test/coretest/test_spiketrain.py::TestTimeShift::test__time_shift_same_units neo/test/coretest/test_spiketrain.py::TestTimeShift::test__time_shift_should_set_parents_to_None neo/test/coretest/test_spiketrain.py::TestTimeShift::test_compliant neo/test/coretest/test_spiketrain.py::TestMerge::test_compliant neo/test/coretest/test_spiketrain.py::TestMerge::test_correct_shape neo/test/coretest/test_spiketrain.py::TestMerge::test_correct_times neo/test/coretest/test_spiketrain.py::TestMerge::test_incompatible_t_start neo/test/coretest/test_spiketrain.py::TestMerge::test_merge_typical neo/test/coretest/test_spiketrain.py::TestMerge::test_merge_with_waveforms neo/test/coretest/test_spiketrain.py::TestMerge::test_missing_waveforms_error neo/test/coretest/test_spiketrain.py::TestMerge::test_neo_relations neo/test/coretest/test_spiketrain.py::TestMerge::test_rescaling_units neo/test/coretest/test_spiketrain.py::TestMerge::test_sampling_rate neo/test/coretest/test_spiketrain.py::TestDuplicateWithNewData::test_deep_copy_attributes neo/test/coretest/test_spiketrain.py::TestDuplicateWithNewData::test_duplicate_with_new_data neo/test/coretest/test_spiketrain.py::TestAttributesAnnotations::test_annotations neo/test/coretest/test_spiketrain.py::TestAttributesAnnotations::test_array_annotations neo/test/coretest/test_spiketrain.py::TestAttributesAnnotations::test_autoset_universally_recommended_attributes neo/test/coretest/test_spiketrain.py::TestAttributesAnnotations::test_set_universally_recommended_attributes neo/test/coretest/test_spiketrain.py::TestChanging::test__adding_time_array neo/test/coretest/test_spiketrain.py::TestChanging::test__adding_time_scalar neo/test/coretest/test_spiketrain.py::TestChanging::test__adding_two_spike_trains neo/test/coretest/test_spiketrain.py::TestChanging::test__changing_multiple_spiketimes neo/test/coretest/test_spiketrain.py::TestChanging::test__changing_multiple_spiketimes_should_check_time_in_range neo/test/coretest/test_spiketrain.py::TestChanging::test__changing_spiketime_should_check_time_in_range neo/test/coretest/test_spiketrain.py::TestChanging::test__rescale neo/test/coretest/test_spiketrain.py::TestChanging::test__rescale_incompatible_units_ValueError neo/test/coretest/test_spiketrain.py::TestChanging::test__rescale_same_units neo/test/coretest/test_spiketrain.py::TestChanging::test__subtracting_time_array neo/test/coretest/test_spiketrain.py::TestChanging::test__subtracting_time_scalar neo/test/coretest/test_spiketrain.py::TestChanging::test__subtracting_two_spike_trains neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_default neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_default_and_data_not_quantity neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_false neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_false_and_data_not_quantity neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_false_and_dtype_change neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_false_and_fake_rescale neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_false_and_rescale_true neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_true neo/test/coretest/test_spiketrain.py::TestChanging::test_change_with_copy_true_and_data_not_quantity neo/test/coretest/test_spiketrain.py::TestChanging::test_changing_slice_changes_original_spiketrain neo/test/coretest/test_spiketrain.py::TestChanging::test_changing_slice_changes_original_spiketrain_with_copy_false neo/test/coretest/test_spiketrain.py::TestChanging::test_init_with_rescale neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__children neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__compliant neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__duration neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__repr neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__right_sweep neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__sampling_period neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__spike_duration neo/test/coretest/test_spiketrain.py::TestPropertiesMethods::test__times neo/test/coretest/test_spiketrain.py::TestMiscellaneous::test__different_dtype_for_t_start_and_array neo/test/coretest/test_spiketrain.py::TestMiscellaneous::test_as_array neo/test/coretest/test_spiketrain.py::TestMiscellaneous::test_as_quantity
neo/core/spiketrain.py
neo/core/spiketrain.py