Skip to content

Conversation

@jbrockmendel
Copy link
Member

Moves remaining contents of core.tools.timedeltas to tslibs.timedeltas. Several can be cut/paste directly. A few changes were made in moving _convert_listlike and to_timedelta up into tslibs.timedeltas.

  • instead of using is_list_like (not implemented in cython), directly exclude str-like case and then check hasattr(arg, '__iter__').
  • instead of using is_timedelta64_dtype(arg), check that arg is an ndarray and then use arg.dtype.kind == 'm'. Analogous for is_integer_dtype.

Updates imports.

@jreback
Copy link
Contributor

jreback commented Nov 9, 2017

instead of using is_timedelta64_dtype(arg), check that arg is an ndarray and then use arg.dtype.kind == 'm'. Analogous for is_integer_dtype.

these are pretty non standard and would like to avoid

# should be raised. If errors == 'coerce', we shouldn't
# expect any errors to be raised, since all parsing errors
# cause coercion to pd.NaT. However, if an error / bug is
# introduced that causes an Exception to be raised, we would
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don’t think a whole lot of value of moving a top level api like this

what is the motivation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah really just unification at this point. For me its a coin-flip as to whether its worthwhile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i prefer to leave self contained to cython or really perf sensitive

python is much easier to debug for most folks

so either close or strip out to minimal changes

also instead of going to new areas can work in trimming the existing list?

really appreciate all things!

@jbrockmendel
Copy link
Member Author

these are pretty non standard and would like to avoid

Prefer a runtime import of the non-cython funcs?

@jbrockmendel
Copy link
Member Author

also instead of going to new areas can work in trimming the existing list?

Ha fair enough. Will close now, may revisit down the road.

@jbrockmendel jbrockmendel deleted the tslibs-timedeltas7 branch November 12, 2017 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants