summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ENH: datetime-arange: Move the unit metadata promotion to a separate functionMark Wiebe2011-06-092-258/+235
| | | | | This cleans up the implementation of arange a lot, and makes the promotion rules behave consistently.
* ENH: datetime-arange: Detect the unit when a dtype with generic units is givenMark Wiebe2011-06-092-17/+40
|
* ENH: datetime-arange: The arange function largely works nowMark Wiebe2011-06-094-58/+158
|
* ENH: datetime-arange: Use the generic units for parameter conversionMark Wiebe2011-06-091-145/+146
|
* ENH: datetime-meta: Add generic units as a datetime unit typeMark Wiebe2011-06-095-110/+215
| | | | | | | This allows integers to convert into timedeltas without binding to a default unit, so that later when it's combined with another data type it adopts that type instead of overriding it haphazardly. This makes things generally more intuitive.
* ENH: datetime-arange: Filling in the datetime-specific arange functionMark Wiebe2011-06-093-73/+365
| | | | | Here I've realized that default 'microsecond' units isn't very good, and would like to make a default 'generic' unit instead.
* ENH: datetime-arange: Add boilerplate for the specialized datetime_arangeMark Wiebe2011-06-093-0/+96
|
* BUG: datetime: Had int instead of Py_ssize_t for an AsStringAndSize callMark Wiebe2011-06-091-1/+1
|
* ENH: datetime-promotion: Unify datetime/timedelta type promotionMark Wiebe2011-06-094-122/+119
| | | | Now it always goes to the more precise unit.
* ENH: datetime-autounit: Make 'now' and 'today' only parse with appropriate unitsMark Wiebe2011-06-093-7/+34
| | | | | In particular, 'now' needs time-like units, and 'today' needs date-like units.
* ENH: datetime-autounit: Automatically detect the unit for scalar constructionMark Wiebe2011-06-094-83/+423
|
* BUG: core: PyArray_NewFromDescr needs to update flags when strides != NULL ↵Mark Wiebe2011-06-092-7/+10
| | | | | | | | (fixes #1863 This appears to have been a longstanding bug, but has come to the surface because PyArray_NewLikeArray uses the function with a non-NULL strides parameter and is used more frequently then other such uses.
* BLD: Fix the date-time related error on 64-bit LinuxMark Wiebe2011-06-082-11/+11
| | | | | This is yet another problem stemming from using the C types as the basis for NumPy data types instead of sized types.
* BLD: Fix build in single-file build modeMark Wiebe2011-06-073-46/+2
|
* Merge branch 'datetime-fixes'Mark Wiebe2011-06-0737-2988/+8121
|\
| * ENH: datetime: Finish fixing up datetime printing, add datetime to string ↵Mark Wiebe2011-06-039-302/+652
| | | | | | | | function with several options
| * ENH: datetime: Remove TimeInteger, partially fix up datetime array printingMark Wiebe2011-06-039-26/+56
| | | | | | | | | | | | | | | | | | The TimeInteger seemed like the wrong abstraction to me. Timedelta is reasonable as an integer, and in fact if NumPy supported arbitrary unit metadata, Timedelta could be removed and that mechanism used instead. Datetime, however, doesn't represent an integer. Datetime has no zero (barring big bang, God's creation, or some other choice...), something which integers definitely have.
| * ENH: datetime: Got repr and str for datetime scalars workingMark Wiebe2011-06-037-49/+714
| |
| * WRN: Eliminate a number of compiler warningsMark Wiebe2011-06-024-5/+2
| |
| * ENH: datetime: Eliminate use of npy_timedeltastruct, an unnecessary abstractionMark Wiebe2011-06-025-188/+266
| |
| * ENH: datetime: Add timedelta -> timedelta scalar castingMark Wiebe2011-06-023-1/+123
| |
| * TST: datetime: Extend the tests for the NumPy scalars as wellMark Wiebe2011-06-021-203/+254
| |
| * ENH: datetime: Generalize the unit parser so datetime scalar can take more ↵Mark Wiebe2011-06-022-31/+88
| | | | | | | | general units
| * ENH: datetime: Fix up creation of datetime scalarMark Wiebe2011-06-024-4/+150
| |
| * ENH: datetime: Allow metadata parameter in datetime scalar constructorsMark Wiebe2011-06-013-120/+338
| |
| * ENH: Remove dead code in PyArray_SetDatetimeParseFunctionMark Wiebe2011-06-013-48/+16
| |
| * ENH: datetime: Remove logical operations from timedeltaMark Wiebe2011-06-013-93/+24
| | | | | | | | | | | | | | | | I think the right way to handle the logical operations is to reduce them to have just a single loop with all booleans, then use casting to get the inputs to those types. This change requires adding custom type resolution to the reduction ufunc methods as well, which is beyond the scope of datetime.
| * ENH: datetime: Add more tests and type resolution for datetimeMark Wiebe2011-06-018-42/+264
| |
| * ENH: Handle NaT in most operations, some progress towards proper casting rulesMark Wiebe2011-05-318-62/+407
| |
| * ENH: datetime: Add min/max type resolution, implement tests for datetime ufuncsMark Wiebe2011-05-316-23/+334
| |
| * ENH: datetime: Implement the multiply and divide DATETIME ufunc loopsMark Wiebe2011-05-314-96/+247
| |
| * ENH: Add ufunc datetime-aware type resolution functions for multiply and divideMark Wiebe2011-05-273-3/+280
| |
| * ENH: Add custom type resolution function for the subtract ufunc with ↵Mark Wiebe2011-05-273-6/+229
| | | | | | | | datetime support
| * ENH: Create type resolution function for 'add' with special datetime rulesMark Wiebe2011-05-276-20/+340
| |
| * ENH: datetime: Got datetime interunit comparisons workingMark Wiebe2011-05-276-244/+581
| |
| * BUG: Fix datetime metadata comparisonMark Wiebe2011-05-262-27/+27
| |
| * ENH: datetime: Some work towards getting datetime casting between units workingMark Wiebe2011-05-265-49/+153
| |
| * ENH: ufunc: Hook up the binary comparison type resolutionMark Wiebe2011-05-262-6/+100
| |
| * ENH: umath: Add a binary comparison type resolution functionMark Wiebe2011-05-266-136/+361
| | | | | | | | | | | | Also remove some DATETIME ufuncs that didn't make sense (since the datetime type has no zero, these functions still make sense for TIMEDELTA).
| * ENH: Generalize ufunc type resolution to be a replaceable functionMark Wiebe2011-05-257-296/+294
| | | | | | | | | | | | | | | | | | The datetime64 is a parameterized type, something which can't be handled with the simple linear list search the ufuncs currently do. This patch adds a function pointer to the end of the ufunc object (should be ABI compatible similar to the metadata addition in 1.4.1), which handles type resolution. This function is set by default to a function which executes the preexisting type resolution functionality.
| * ENH: datetime: Tests and fixes for datetime64 <-> object roundtrippingMark Wiebe2011-05-254-28/+55
| |
| * ENH: Cleaning up object <-> datetime conversionsMark Wiebe2011-05-244-3/+44
| |
| * ENH: Refactored DATETIME_getitem and the function it callsMark Wiebe2011-05-246-1277/+449
| |
| * BUG: Was incorrectly using month and day in npy_datetimestructMark Wiebe2011-05-241-21/+14
| |
| * ENH: Refactor datetime conversion from PyObject* into its own functionMark Wiebe2011-05-244-130/+344
| |
| * ENH: Got the ISO date parser working in DATETIME_setitemMark Wiebe2011-05-235-111/+231
| | | | | | | | | | Also added support for parsing events as an integer after the time portion of the string.
| * ENH: Wrote (close to an) ISO date parser, partially modified TIMEVALUE_setitemMark Wiebe2011-05-235-33/+657
| | | | | | | | | | | | | | | | It turns out that the date-time API for converting the npy_datetimestruct to an npy_datetime takes just the NPY_DATETIMEUNIT, not a datetime metadata struct, but I wanted to commit here as a checkpoint before adding what's needed there.
| * BUG: Restore pickling functionality, incorporate Chuck's feedbackMark Wiebe2011-05-233-13/+87
| | | | | | | | | | | | It turned out pickle roundtripping wasn't being tested, and the changes I did broke that. This restores that functionality and improves some error checking and formatting as suggested by Chuck.
| * ENH: promote_types applies the datetime promotion rulesMark Wiebe2011-05-205-30/+304
| |
| * ENH: Remove 'den' datetime metadata, move datetime_data to a C functionMark Wiebe2011-05-2010-133/+126
| | | | | | | | | | | | | | | | | | The 'den' metadata was always 1, except during construction, so there is no reason for it to exist. The variable is kept in the struct for 1.6 ABI compatibility, however. The datetime_data function used ctypes. Moving the function to C is no more difficult, and a bit cleaner in my opinion.