| @@ -14,10 +14,10 @@ module Docs · 13 unmodified lines |
| 14 | def get_type | 14 | def get_type |
| 15 | nav_items = css('.nav.nav-pills.pull-left > li') | 15 | nav_items = css('.nav.nav-pills.pull-left > li') |
| 16 | | 16 | |
| 17 | if nav_items[3] | 17 | if nav_items[5] |
| 18 | type = nav_items[3].content | 18 | type = nav_items[5].content |
| 19 | elsif nav_items[2] && nav_items[2].content !~ /Manual|Reference/ | 19 | elsif nav_items[4] && nav_items[4].content !~ /Manual|Reference/ |
| 20 | type = nav_items[2].content | 20 | type = nav_items[4].content |
| 21 | else | 21 | else |
| 22 | type = at_css('h1').content.strip | 22 | type = at_css('h1').content.strip |
| 23 | type.remove! "\u{00B6}" | 23 | type.remove! "\u{00B6}" |
| @@ -29,7 +29,7 @@ module Docs · 5 unmodified lines |
| 29 | type = 'Universal functions' | 29 | type = 'Universal functions' |
| 30 | elsif type.start_with?('numpy.nditer.') || type.start_with?('numpy.lib.Arrayterator.') || type.start_with?('numpy.flatiter.') | 30 | elsif type.start_with?('numpy.nditer.') || type.start_with?('numpy.lib.Arrayterator.') || type.start_with?('numpy.flatiter.') |
| 31 | type = 'Indexing routines' | 31 | type = 'Indexing routines' |
| 32 | elsif type.start_with?('numpy.record.') || type.start_with?('numpy.recarray.') || type.start_with?('numpy.broadcast.') || type.start_with?('numpy.matrix.') | 32 | elsif type.start_with?('numpy.record.') || type.start_with?('numpy.recarray.') || type.start_with?('numpy.broadcast.') || type.start_with?('numpy.matrix.') || type.start_with?('numpy.ma.') |
| 33 | type = 'Standard array subclasses' | 33 | type = 'Standard array subclasses' |
| 34 | elsif type.start_with?('numpy.busdaycalendar.') | 34 | elsif type.start_with?('numpy.busdaycalendar.') |
| 35 | type = 'Datetime support functions' | 35 | type = 'Datetime support functions' |
| @@ -41,9 +41,9 @@ module Docs · 5 unmodified lines |
| 41 | type = 'Data type objects' | 41 | type = 'Data type objects' |
| 42 | elsif type.start_with?('numpy.generic.') | 42 | elsif type.start_with?('numpy.generic.') |
| 43 | type = 'Scalars' | 43 | type = 'Scalars' |
| 44 | elsif type.start_with?('numpy.char.chararray.') || type.start_with?('numpy.core.defchararray.chararray.') | 44 | elsif type.start_with?('numpy.chararray.') || type.start_with?('numpy.char.chararray.') || type.start_with?('numpy.core.defchararray.chararray.') |
| 45 | type = 'String operations' | 45 | type = 'String operations' |
| 46 | elsif type == 'numpy.memmap.shape' | 46 | elsif type.start_with?('numpy.memmap.') |
| 47 | type = 'Input and output' | 47 | type = 'Input and output' |
| 48 | elsif type == 'numpy.poly1d.variable' | 48 | elsif type == 'numpy.poly1d.variable' |
| 49 | type = 'Polynomials' | 49 | type = 'Polynomials' |