Best Python code snippet using django-test-plus_python
pokemon.ts
Source:pokemon.ts
1// Next.js API route support: https://nextjs.org/docs/api-routes/introduction2import type { NextApiRequest, NextApiResponse } from 'next'3export default function handler(req: NextApiRequest, res: NextApiResponse) {4 res.status(200).json([5 {6 id: 1,7 name: 'Bulbasaur',8 type: ['Grass', 'Poison'],9 hp: 45,10 attack: 49,11 defense: 49,12 special_attack: 65,13 special_defense: 65,14 speed: 45,15 },16 {17 id: 2,18 name: 'Ivysaur',19 type: ['Grass', 'Poison'],20 hp: 60,21 attack: 62,22 defense: 63,23 special_attack: 80,24 special_defense: 80,25 speed: 60,26 },27 {28 id: 3,29 name: 'Venusaur',30 type: ['Grass', 'Poison'],31 hp: 80,32 attack: 82,33 defense: 83,34 special_attack: 100,35 special_defense: 100,36 speed: 80,37 },38 {39 id: 4,40 name: 'Charmander',41 type: ['Fire'],42 hp: 39,43 attack: 52,44 defense: 43,45 special_attack: 60,46 special_defense: 50,47 speed: 65,48 },49 {50 id: 5,51 name: 'Charmeleon',52 type: ['Fire'],53 hp: 58,54 attack: 64,55 defense: 58,56 special_attack: 80,57 special_defense: 65,58 speed: 80,59 },60 {61 id: 6,62 name: 'Charizard',63 type: ['Fire', 'Flying'],64 hp: 78,65 attack: 84,66 defense: 78,67 special_attack: 109,68 special_defense: 85,69 speed: 100,70 },71 {72 id: 7,73 name: 'Squirtle',74 type: ['Water'],75 hp: 44,76 attack: 48,77 defense: 65,78 special_attack: 50,79 special_defense: 64,80 speed: 43,81 },82 {83 id: 8,84 name: 'Wartortle',85 type: ['Water'],86 hp: 59,87 attack: 63,88 defense: 80,89 special_attack: 65,90 special_defense: 80,91 speed: 58,92 },93 {94 id: 9,95 name: 'Blastoise',96 type: ['Water'],97 hp: 79,98 attack: 83,99 defense: 100,100 special_attack: 85,101 special_defense: 105,102 speed: 78,103 },104 {105 id: 10,106 name: 'Caterpie',107 type: ['Bug'],108 hp: 45,109 attack: 30,110 defense: 35,111 special_attack: 20,112 special_defense: 20,113 speed: 45,114 },115 {116 id: 11,117 name: 'Metapod',118 type: ['Bug'],119 hp: 50,120 attack: 20,121 defense: 55,122 special_attack: 25,123 special_defense: 25,124 speed: 30,125 },126 {127 id: 12,128 name: 'Butterfree',129 type: ['Bug', 'Flying'],130 hp: 60,131 attack: 45,132 defense: 50,133 special_attack: 90,134 special_defense: 80,135 speed: 70,136 },137 {138 id: 13,139 name: 'Weedle',140 type: ['Bug', 'Poison'],141 hp: 40,142 attack: 35,143 defense: 30,144 special_attack: 20,145 special_defense: 20,146 speed: 50,147 },148 {149 id: 14,150 name: 'Kakuna',151 type: ['Bug', 'Poison'],152 hp: 45,153 attack: 25,154 defense: 50,155 special_attack: 25,156 special_defense: 25,157 speed: 35,158 },159 {160 id: 15,161 name: 'Beedrill',162 type: ['Bug', 'Poison'],163 hp: 65,164 attack: 90,165 defense: 40,166 special_attack: 45,167 special_defense: 80,168 speed: 75,169 },170 {171 id: 16,172 name: 'Pidgey',173 type: ['Normal', 'Flying'],174 hp: 40,175 attack: 45,176 defense: 40,177 special_attack: 35,178 special_defense: 35,179 speed: 56,180 },181 {182 id: 17,183 name: 'Pidgeotto',184 type: ['Normal', 'Flying'],185 hp: 63,186 attack: 60,187 defense: 55,188 special_attack: 50,189 special_defense: 50,190 speed: 71,191 },192 {193 id: 18,194 name: 'Pidgeot',195 type: ['Normal', 'Flying'],196 hp: 83,197 attack: 80,198 defense: 75,199 special_attack: 70,200 special_defense: 70,201 speed: 101,202 },203 {204 id: 19,205 name: 'Rattata',206 type: ['Normal'],207 hp: 30,208 attack: 56,209 defense: 35,210 special_attack: 25,211 special_defense: 35,212 speed: 72,213 },214 {215 id: 20,216 name: 'Raticate',217 type: ['Normal'],218 hp: 55,219 attack: 81,220 defense: 60,221 special_attack: 50,222 special_defense: 70,223 speed: 97,224 },225 {226 id: 21,227 name: 'Spearow',228 type: ['Normal', 'Flying'],229 hp: 40,230 attack: 60,231 defense: 30,232 special_attack: 31,233 special_defense: 31,234 speed: 70,235 },236 {237 id: 22,238 name: 'Fearow',239 type: ['Normal', 'Flying'],240 hp: 65,241 attack: 90,242 defense: 65,243 special_attack: 61,244 special_defense: 61,245 speed: 100,246 },247 {248 id: 23,249 name: 'Ekans',250 type: ['Poison'],251 hp: 35,252 attack: 60,253 defense: 44,254 special_attack: 40,255 special_defense: 54,256 speed: 55,257 },258 {259 id: 24,260 name: 'Arbok',261 type: ['Poison'],262 hp: 60,263 attack: 95,264 defense: 69,265 special_attack: 65,266 special_defense: 79,267 speed: 80,268 },269 {270 id: 25,271 name: 'Pikachu',272 type: ['Electric'],273 hp: 35,274 attack: 55,275 defense: 40,276 special_attack: 50,277 special_defense: 50,278 speed: 90,279 },280 {281 id: 26,282 name: 'Raichu',283 type: ['Electric'],284 hp: 60,285 attack: 90,286 defense: 55,287 special_attack: 90,288 special_defense: 80,289 speed: 110,290 },291 {292 id: 27,293 name: 'Sandshrew',294 type: ['Ground'],295 hp: 50,296 attack: 75,297 defense: 85,298 special_attack: 20,299 special_defense: 30,300 speed: 40,301 },302 {303 id: 28,304 name: 'Sandslash',305 type: ['Ground'],306 hp: 75,307 attack: 100,308 defense: 110,309 special_attack: 45,310 special_defense: 55,311 speed: 65,312 },313 {314 id: 29,315 name: 'Nidoranâ',316 type: ['Poison'],317 hp: 55,318 attack: 47,319 defense: 52,320 special_attack: 40,321 special_defense: 40,322 speed: 41,323 },324 {325 id: 30,326 name: 'Nidorina',327 type: ['Poison'],328 hp: 70,329 attack: 62,330 defense: 67,331 special_attack: 55,332 special_defense: 55,333 speed: 56,334 },335 {336 id: 31,337 name: 'Nidoqueen',338 type: ['Poison', 'Ground'],339 hp: 90,340 attack: 92,341 defense: 87,342 special_attack: 75,343 special_defense: 85,344 speed: 76,345 },346 {347 id: 32,348 name: 'Nidoranâ',349 type: ['Poison'],350 hp: 46,351 attack: 57,352 defense: 40,353 special_attack: 40,354 special_defense: 40,355 speed: 50,356 },357 {358 id: 33,359 name: 'Nidorino',360 type: ['Poison'],361 hp: 61,362 attack: 72,363 defense: 57,364 special_attack: 55,365 special_defense: 55,366 speed: 65,367 },368 {369 id: 34,370 name: 'Nidoking',371 type: ['Poison', 'Ground'],372 hp: 81,373 attack: 102,374 defense: 77,375 special_attack: 85,376 special_defense: 75,377 speed: 85,378 },379 {380 id: 35,381 name: 'Clefairy',382 type: ['Fairy'],383 hp: 70,384 attack: 45,385 defense: 48,386 special_attack: 60,387 special_defense: 65,388 speed: 35,389 },390 {391 id: 36,392 name: 'Clefable',393 type: ['Fairy'],394 hp: 95,395 attack: 70,396 defense: 73,397 special_attack: 95,398 special_defense: 90,399 speed: 60,400 },401 {402 id: 37,403 name: 'Vulpix',404 type: ['Fire'],405 hp: 38,406 attack: 41,407 defense: 40,408 special_attack: 50,409 special_defense: 65,410 speed: 65,411 },412 {413 id: 38,414 name: 'Ninetales',415 type: ['Fire'],416 hp: 73,417 attack: 76,418 defense: 75,419 special_attack: 81,420 special_defense: 100,421 speed: 100,422 },423 {424 id: 39,425 name: 'Jigglypuff',426 type: ['Normal', 'Fairy'],427 hp: 115,428 attack: 45,429 defense: 20,430 special_attack: 45,431 special_defense: 25,432 speed: 20,433 },434 {435 id: 40,436 name: 'Wigglytuff',437 type: ['Normal', 'Fairy'],438 hp: 140,439 attack: 70,440 defense: 45,441 special_attack: 85,442 special_defense: 50,443 speed: 45,444 },445 {446 id: 41,447 name: 'Zubat',448 type: ['Poison', 'Flying'],449 hp: 40,450 attack: 45,451 defense: 35,452 special_attack: 30,453 special_defense: 40,454 speed: 55,455 },456 {457 id: 42,458 name: 'Golbat',459 type: ['Poison', 'Flying'],460 hp: 75,461 attack: 80,462 defense: 70,463 special_attack: 65,464 special_defense: 75,465 speed: 90,466 },467 {468 id: 43,469 name: 'Oddish',470 type: ['Grass', 'Poison'],471 hp: 45,472 attack: 50,473 defense: 55,474 special_attack: 75,475 special_defense: 65,476 speed: 30,477 },478 {479 id: 44,480 name: 'Gloom',481 type: ['Grass', 'Poison'],482 hp: 60,483 attack: 65,484 defense: 70,485 special_attack: 85,486 special_defense: 75,487 speed: 40,488 },489 {490 id: 45,491 name: 'Vileplume',492 type: ['Grass', 'Poison'],493 hp: 75,494 attack: 80,495 defense: 85,496 special_attack: 110,497 special_defense: 90,498 speed: 50,499 },500 {501 id: 46,502 name: 'Paras',503 type: ['Bug', 'Grass'],504 hp: 35,505 attack: 70,506 defense: 55,507 special_attack: 45,508 special_defense: 55,509 speed: 25,510 },511 {512 id: 47,513 name: 'Parasect',514 type: ['Bug', 'Grass'],515 hp: 60,516 attack: 95,517 defense: 80,518 special_attack: 60,519 special_defense: 80,520 speed: 30,521 },522 {523 id: 48,524 name: 'Venonat',525 type: ['Bug', 'Poison'],526 hp: 60,527 attack: 55,528 defense: 50,529 special_attack: 40,530 special_defense: 55,531 speed: 45,532 },533 {534 id: 49,535 name: 'Venomoth',536 type: ['Bug', 'Poison'],537 hp: 70,538 attack: 65,539 defense: 60,540 special_attack: 90,541 special_defense: 75,542 speed: 90,543 },544 {545 id: 50,546 name: 'Diglett',547 type: ['Ground'],548 hp: 10,549 attack: 55,550 defense: 25,551 special_attack: 35,552 special_defense: 45,553 speed: 95,554 },555 {556 id: 51,557 name: 'Dugtrio',558 type: ['Ground'],559 hp: 35,560 attack: 100,561 defense: 50,562 special_attack: 50,563 special_defense: 70,564 speed: 120,565 },566 {567 id: 52,568 name: 'Meowth',569 type: ['Normal'],570 hp: 40,571 attack: 45,572 defense: 35,573 special_attack: 40,574 special_defense: 40,575 speed: 90,576 },577 {578 id: 53,579 name: 'Persian',580 type: ['Normal'],581 hp: 65,582 attack: 70,583 defense: 60,584 special_attack: 65,585 special_defense: 65,586 speed: 115,587 },588 {589 id: 54,590 name: 'Psyduck',591 type: ['Water'],592 hp: 50,593 attack: 52,594 defense: 48,595 special_attack: 65,596 special_defense: 50,597 speed: 55,598 },599 {600 id: 55,601 name: 'Golduck',602 type: ['Water'],603 hp: 80,604 attack: 82,605 defense: 78,606 special_attack: 95,607 special_defense: 80,608 speed: 85,609 },610 {611 id: 56,612 name: 'Mankey',613 type: ['Fighting'],614 hp: 40,615 attack: 80,616 defense: 35,617 special_attack: 35,618 special_defense: 45,619 speed: 70,620 },621 {622 id: 57,623 name: 'Primeape',624 type: ['Fighting'],625 hp: 65,626 attack: 105,627 defense: 60,628 special_attack: 60,629 special_defense: 70,630 speed: 95,631 },632 {633 id: 58,634 name: 'Growlithe',635 type: ['Fire'],636 hp: 55,637 attack: 70,638 defense: 45,639 special_attack: 70,640 special_defense: 50,641 speed: 60,642 },643 {644 id: 59,645 name: 'Arcanine',646 type: ['Fire'],647 hp: 90,648 attack: 110,649 defense: 80,650 special_attack: 100,651 special_defense: 80,652 speed: 95,653 },654 {655 id: 60,656 name: 'Poliwag',657 type: ['Water'],658 hp: 40,659 attack: 50,660 defense: 40,661 special_attack: 40,662 special_defense: 40,663 speed: 90,664 },665 {666 id: 61,667 name: 'Poliwhirl',668 type: ['Water'],669 hp: 65,670 attack: 65,671 defense: 65,672 special_attack: 50,673 special_defense: 50,674 speed: 90,675 },676 {677 id: 62,678 name: 'Poliwrath',679 type: ['Water', 'Fighting'],680 hp: 90,681 attack: 95,682 defense: 95,683 special_attack: 70,684 special_defense: 90,685 speed: 70,686 },687 {688 id: 63,689 name: 'Abra',690 type: ['Psychic'],691 hp: 25,692 attack: 20,693 defense: 15,694 special_attack: 105,695 special_defense: 55,696 speed: 90,697 },698 {699 id: 64,700 name: 'Kadabra',701 type: ['Psychic'],702 hp: 40,703 attack: 35,704 defense: 30,705 special_attack: 120,706 special_defense: 70,707 speed: 105,708 },709 {710 id: 65,711 name: 'Alakazam',712 type: ['Psychic'],713 hp: 55,714 attack: 50,715 defense: 45,716 special_attack: 135,717 special_defense: 95,718 speed: 120,719 },720 {721 id: 66,722 name: 'Machop',723 type: ['Fighting'],724 hp: 70,725 attack: 80,726 defense: 50,727 special_attack: 35,728 special_defense: 35,729 speed: 35,730 },731 {732 id: 67,733 name: 'Machoke',734 type: ['Fighting'],735 hp: 80,736 attack: 100,737 defense: 70,738 special_attack: 50,739 special_defense: 60,740 speed: 45,741 },742 {743 id: 68,744 name: 'Machamp',745 type: ['Fighting'],746 hp: 90,747 attack: 130,748 defense: 80,749 special_attack: 65,750 special_defense: 85,751 speed: 55,752 },753 {754 id: 69,755 name: 'Bellsprout',756 type: ['Grass', 'Poison'],757 hp: 50,758 attack: 75,759 defense: 35,760 special_attack: 70,761 special_defense: 30,762 speed: 40,763 },764 {765 id: 70,766 name: 'Weepinbell',767 type: ['Grass', 'Poison'],768 hp: 65,769 attack: 90,770 defense: 50,771 special_attack: 85,772 special_defense: 45,773 speed: 55,774 },775 {776 id: 71,777 name: 'Victreebel',778 type: ['Grass', 'Poison'],779 hp: 80,780 attack: 105,781 defense: 65,782 special_attack: 100,783 special_defense: 70,784 speed: 70,785 },786 {787 id: 72,788 name: 'Tentacool',789 type: ['Water', 'Poison'],790 hp: 40,791 attack: 40,792 defense: 35,793 special_attack: 50,794 special_defense: 100,795 speed: 70,796 },797 {798 id: 73,799 name: 'Tentacruel',800 type: ['Water', 'Poison'],801 hp: 80,802 attack: 70,803 defense: 65,804 special_attack: 80,805 special_defense: 120,806 speed: 100,807 },808 {809 id: 74,810 name: 'Geodude',811 type: ['Rock', 'Ground'],812 hp: 40,813 attack: 80,814 defense: 100,815 special_attack: 30,816 special_defense: 30,817 speed: 20,818 },819 {820 id: 75,821 name: 'Graveler',822 type: ['Rock', 'Ground'],823 hp: 55,824 attack: 95,825 defense: 115,826 special_attack: 45,827 special_defense: 45,828 speed: 35,829 },830 {831 id: 76,832 name: 'Golem',833 type: ['Rock', 'Ground'],834 hp: 80,835 attack: 120,836 defense: 130,837 special_attack: 55,838 special_defense: 65,839 speed: 45,840 },841 {842 id: 77,843 name: 'Ponyta',844 type: ['Fire'],845 hp: 50,846 attack: 85,847 defense: 55,848 special_attack: 65,849 special_defense: 65,850 speed: 90,851 },852 {853 id: 78,854 name: 'Rapidash',855 type: ['Fire'],856 hp: 65,857 attack: 100,858 defense: 70,859 special_attack: 80,860 special_defense: 80,861 speed: 105,862 },863 {864 id: 79,865 name: 'Slowpoke',866 type: ['Water', 'Psychic'],867 hp: 90,868 attack: 65,869 defense: 65,870 special_attack: 40,871 special_defense: 40,872 speed: 15,873 },874 {875 id: 80,876 name: 'Slowbro',877 type: ['Water', 'Psychic'],878 hp: 95,879 attack: 75,880 defense: 110,881 special_attack: 100,882 special_defense: 80,883 speed: 30,884 },885 {886 id: 81,887 name: 'Magnemite',888 type: ['Electric', 'Steel'],889 hp: 25,890 attack: 35,891 defense: 70,892 special_attack: 95,893 special_defense: 55,894 speed: 45,895 },896 {897 id: 82,898 name: 'Magneton',899 type: ['Electric', 'Steel'],900 hp: 50,901 attack: 60,902 defense: 95,903 special_attack: 120,904 special_defense: 70,905 speed: 70,906 },907 {908 id: 83,909 name: "Farfetch'd",910 type: ['Normal', 'Flying'],911 hp: 52,912 attack: 90,913 defense: 55,914 special_attack: 58,915 special_defense: 62,916 speed: 60,917 },918 {919 id: 84,920 name: 'Doduo',921 type: ['Normal', 'Flying'],922 hp: 35,923 attack: 85,924 defense: 45,925 special_attack: 35,926 special_defense: 35,927 speed: 75,928 },929 {930 id: 85,931 name: 'Dodrio',932 type: ['Normal', 'Flying'],933 hp: 60,934 attack: 110,935 defense: 70,936 special_attack: 60,937 special_defense: 60,938 speed: 110,939 },940 {941 id: 86,942 name: 'Seel',943 type: ['Water'],944 hp: 65,945 attack: 45,946 defense: 55,947 special_attack: 45,948 special_defense: 70,949 speed: 45,950 },951 {952 id: 87,953 name: 'Dewgong',954 type: ['Water', 'Ice'],955 hp: 90,956 attack: 70,957 defense: 80,958 special_attack: 70,959 special_defense: 95,960 speed: 70,961 },962 {963 id: 88,964 name: 'Grimer',965 type: ['Poison'],966 hp: 80,967 attack: 80,968 defense: 50,969 special_attack: 40,970 special_defense: 50,971 speed: 25,972 },973 {974 id: 89,975 name: 'Muk',976 type: ['Poison'],977 hp: 105,978 attack: 105,979 defense: 75,980 special_attack: 65,981 special_defense: 100,982 speed: 50,983 },984 {985 id: 90,986 name: 'Shellder',987 type: ['Water'],988 hp: 30,989 attack: 65,990 defense: 100,991 special_attack: 45,992 special_defense: 25,993 speed: 40,994 },995 {996 id: 91,997 name: 'Cloyster',998 type: ['Water', 'Ice'],999 hp: 50,1000 attack: 95,1001 defense: 180,1002 special_attack: 85,1003 special_defense: 45,1004 speed: 70,1005 },1006 {1007 id: 92,1008 name: 'Gastly',1009 type: ['Ghost', 'Poison'],1010 hp: 30,1011 attack: 35,1012 defense: 30,1013 special_attack: 100,1014 special_defense: 35,1015 speed: 80,1016 },1017 {1018 id: 93,1019 name: 'Haunter',1020 type: ['Ghost', 'Poison'],1021 hp: 45,1022 attack: 50,1023 defense: 45,1024 special_attack: 115,1025 special_defense: 55,1026 speed: 95,1027 },1028 {1029 id: 94,1030 name: 'Gengar',1031 type: ['Ghost', 'Poison'],1032 hp: 60,1033 attack: 65,1034 defense: 60,1035 special_attack: 130,1036 special_defense: 75,1037 speed: 110,1038 },1039 {1040 id: 95,1041 name: 'Onix',1042 type: ['Rock', 'Ground'],1043 hp: 35,1044 attack: 45,1045 defense: 160,1046 special_attack: 30,1047 special_defense: 45,1048 speed: 70,1049 },1050 {1051 id: 96,1052 name: 'Drowzee',1053 type: ['Psychic'],1054 hp: 60,1055 attack: 48,1056 defense: 45,1057 special_attack: 43,1058 special_defense: 90,1059 speed: 42,1060 },1061 {1062 id: 97,1063 name: 'Hypno',1064 type: ['Psychic'],1065 hp: 85,1066 attack: 73,1067 defense: 70,1068 special_attack: 73,1069 special_defense: 115,1070 speed: 67,1071 },1072 {1073 id: 98,1074 name: 'Krabby',1075 type: ['Water'],1076 hp: 30,1077 attack: 105,1078 defense: 90,1079 special_attack: 25,1080 special_defense: 25,1081 speed: 50,1082 },1083 {1084 id: 99,1085 name: 'Kingler',1086 type: ['Water'],1087 hp: 55,1088 attack: 130,1089 defense: 115,1090 special_attack: 50,1091 special_defense: 50,1092 speed: 75,1093 },1094 {1095 id: 100,1096 name: 'Voltorb',1097 type: ['Electric'],1098 hp: 40,1099 attack: 30,1100 defense: 50,1101 special_attack: 55,1102 special_defense: 55,1103 speed: 100,1104 },1105 {1106 id: 101,1107 name: 'Electrode',1108 type: ['Electric'],1109 hp: 60,1110 attack: 50,1111 defense: 70,1112 special_attack: 80,1113 special_defense: 80,1114 speed: 150,1115 },1116 {1117 id: 102,1118 name: 'Exeggcute',1119 type: ['Grass', 'Psychic'],1120 hp: 60,1121 attack: 40,1122 defense: 80,1123 special_attack: 60,1124 special_defense: 45,1125 speed: 40,1126 },1127 {1128 id: 103,1129 name: 'Exeggutor',1130 type: ['Grass', 'Psychic'],1131 hp: 95,1132 attack: 95,1133 defense: 85,1134 special_attack: 125,1135 special_defense: 75,1136 speed: 55,1137 },1138 {1139 id: 104,1140 name: 'Cubone',1141 type: ['Ground'],1142 hp: 50,1143 attack: 50,1144 defense: 95,1145 special_attack: 40,1146 special_defense: 50,1147 speed: 35,1148 },1149 {1150 id: 105,1151 name: 'Marowak',1152 type: ['Ground'],1153 hp: 60,1154 attack: 80,1155 defense: 110,1156 special_attack: 50,1157 special_defense: 80,1158 speed: 45,1159 },1160 {1161 id: 106,1162 name: 'Hitmonlee',1163 type: ['Fighting'],1164 hp: 50,1165 attack: 120,1166 defense: 53,1167 special_attack: 35,1168 special_defense: 110,1169 speed: 87,1170 },1171 {1172 id: 107,1173 name: 'Hitmonchan',1174 type: ['Fighting'],1175 hp: 50,1176 attack: 105,1177 defense: 79,1178 special_attack: 35,1179 special_defense: 110,1180 speed: 76,1181 },1182 {1183 id: 108,1184 name: 'Lickitung',1185 type: ['Normal'],1186 hp: 90,1187 attack: 55,1188 defense: 75,1189 special_attack: 60,1190 special_defense: 75,1191 speed: 30,1192 },1193 {1194 id: 109,1195 name: 'Koffing',1196 type: ['Poison'],1197 hp: 40,1198 attack: 65,1199 defense: 95,1200 special_attack: 60,1201 special_defense: 45,1202 speed: 35,1203 },1204 {1205 id: 110,1206 name: 'Weezing',1207 type: ['Poison'],1208 hp: 65,1209 attack: 90,1210 defense: 120,1211 special_attack: 85,1212 special_defense: 70,1213 speed: 60,1214 },1215 {1216 id: 111,1217 name: 'Rhyhorn',1218 type: ['Ground', 'Rock'],1219 hp: 80,1220 attack: 85,1221 defense: 95,1222 special_attack: 30,1223 special_defense: 30,1224 speed: 25,1225 },1226 {1227 id: 112,1228 name: 'Rhydon',1229 type: ['Ground', 'Rock'],1230 hp: 105,1231 attack: 130,1232 defense: 120,1233 special_attack: 45,1234 special_defense: 45,1235 speed: 40,1236 },1237 {1238 id: 113,1239 name: 'Chansey',1240 type: ['Normal'],1241 hp: 250,1242 attack: 5,1243 defense: 5,1244 special_attack: 35,1245 special_defense: 105,1246 speed: 50,1247 },1248 {1249 id: 114,1250 name: 'Tangela',1251 type: ['Grass'],1252 hp: 65,1253 attack: 55,1254 defense: 115,1255 special_attack: 100,1256 special_defense: 40,1257 speed: 60,1258 },1259 {1260 id: 115,1261 name: 'Kangaskhan',1262 type: ['Normal'],1263 hp: 105,1264 attack: 95,1265 defense: 80,1266 special_attack: 40,1267 special_defense: 80,1268 speed: 90,1269 },1270 {1271 id: 116,1272 name: 'Horsea',1273 type: ['Water'],1274 hp: 30,1275 attack: 40,1276 defense: 70,1277 special_attack: 70,1278 special_defense: 25,1279 speed: 60,1280 },1281 {1282 id: 117,1283 name: 'Seadra',1284 type: ['Water'],1285 hp: 55,1286 attack: 65,1287 defense: 95,1288 special_attack: 95,1289 special_defense: 45,1290 speed: 85,1291 },1292 {1293 id: 118,1294 name: 'Goldeen',1295 type: ['Water'],1296 hp: 45,1297 attack: 67,1298 defense: 60,1299 special_attack: 35,1300 special_defense: 50,1301 speed: 63,1302 },1303 {1304 id: 119,1305 name: 'Seaking',1306 type: ['Water'],1307 hp: 80,1308 attack: 92,1309 defense: 65,1310 special_attack: 65,1311 special_defense: 80,1312 speed: 68,1313 },1314 {1315 id: 120,1316 name: 'Staryu',1317 type: ['Water'],1318 hp: 30,1319 attack: 45,1320 defense: 55,1321 special_attack: 70,1322 special_defense: 55,1323 speed: 85,1324 },1325 {1326 id: 121,1327 name: 'Starmie',1328 type: ['Water', 'Psychic'],1329 hp: 60,1330 attack: 75,1331 defense: 85,1332 special_attack: 100,1333 special_defense: 85,1334 speed: 115,1335 },1336 {1337 id: 122,1338 name: 'Mr. Mime',1339 type: ['Psychic', 'Fairy'],1340 hp: 40,1341 attack: 45,1342 defense: 65,1343 special_attack: 100,1344 special_defense: 120,1345 speed: 90,1346 },1347 {1348 id: 123,1349 name: 'Scyther',1350 type: ['Bug', 'Flying'],1351 hp: 70,1352 attack: 110,1353 defense: 80,1354 special_attack: 55,1355 special_defense: 80,1356 speed: 105,1357 },1358 {1359 id: 124,1360 name: 'Jynx',1361 type: ['Ice', 'Psychic'],1362 hp: 65,1363 attack: 50,1364 defense: 35,1365 special_attack: 115,1366 special_defense: 95,1367 speed: 95,1368 },1369 {1370 id: 125,1371 name: 'Electabuzz',1372 type: ['Electric'],1373 hp: 65,1374 attack: 83,1375 defense: 57,1376 special_attack: 95,1377 special_defense: 85,1378 speed: 105,1379 },1380 {1381 id: 126,1382 name: 'Magmar',1383 type: ['Fire'],1384 hp: 65,1385 attack: 95,1386 defense: 57,1387 special_attack: 100,1388 special_defense: 85,1389 speed: 93,1390 },1391 {1392 id: 127,1393 name: 'Pinsir',1394 type: ['Bug'],1395 hp: 65,1396 attack: 125,1397 defense: 100,1398 special_attack: 55,1399 special_defense: 70,1400 speed: 85,1401 },1402 {1403 id: 128,1404 name: 'Tauros',1405 type: ['Normal'],1406 hp: 75,1407 attack: 100,1408 defense: 95,1409 special_attack: 40,1410 special_defense: 70,1411 speed: 110,1412 },1413 {1414 id: 129,1415 name: 'Magikarp',1416 type: ['Water'],1417 hp: 20,1418 attack: 10,1419 defense: 55,1420 special_attack: 15,1421 special_defense: 20,1422 speed: 80,1423 },1424 {1425 id: 130,1426 name: 'Gyarados',1427 type: ['Water', 'Flying'],1428 hp: 95,1429 attack: 125,1430 defense: 79,1431 special_attack: 60,1432 special_defense: 100,1433 speed: 81,1434 },1435 {1436 id: 131,1437 name: 'Lapras',1438 type: ['Water', 'Ice'],1439 hp: 130,1440 attack: 85,1441 defense: 80,1442 special_attack: 85,1443 special_defense: 95,1444 speed: 60,1445 },1446 {1447 id: 132,1448 name: 'Ditto',1449 type: ['Normal'],1450 hp: 48,1451 attack: 48,1452 defense: 48,1453 special_attack: 48,1454 special_defense: 48,1455 speed: 48,1456 },1457 {1458 id: 133,1459 name: 'Eevee',1460 type: ['Normal'],1461 hp: 55,1462 attack: 55,1463 defense: 50,1464 special_attack: 45,1465 special_defense: 65,1466 speed: 55,1467 },1468 {1469 id: 134,1470 name: 'Vaporeon',1471 type: ['Water'],1472 hp: 130,1473 attack: 65,1474 defense: 60,1475 special_attack: 110,1476 special_defense: 95,1477 speed: 65,1478 },1479 {1480 id: 135,1481 name: 'Jolteon',1482 type: ['Electric'],1483 hp: 65,1484 attack: 65,1485 defense: 60,1486 special_attack: 110,1487 special_defense: 95,1488 speed: 130,1489 },1490 {1491 id: 136,1492 name: 'Flareon',1493 type: ['Fire'],1494 hp: 65,1495 attack: 130,1496 defense: 60,1497 special_attack: 95,1498 special_defense: 110,1499 speed: 65,1500 },1501 {1502 id: 137,1503 name: 'Porygon',1504 type: ['Normal'],1505 hp: 65,1506 attack: 60,1507 defense: 70,1508 special_attack: 85,1509 special_defense: 75,1510 speed: 40,1511 },1512 {1513 id: 138,1514 name: 'Omanyte',1515 type: ['Rock', 'Water'],1516 hp: 35,1517 attack: 40,1518 defense: 100,1519 special_attack: 90,1520 special_defense: 55,1521 speed: 35,1522 },1523 {1524 id: 139,1525 name: 'Omastar',1526 type: ['Rock', 'Water'],1527 hp: 70,1528 attack: 60,1529 defense: 125,1530 special_attack: 115,1531 special_defense: 70,1532 speed: 55,1533 },1534 {1535 id: 140,1536 name: 'Kabuto',1537 type: ['Rock', 'Water'],1538 hp: 30,1539 attack: 80,1540 defense: 90,1541 special_attack: 55,1542 special_defense: 45,1543 speed: 55,1544 },1545 {1546 id: 141,1547 name: 'Kabutops',1548 type: ['Rock', 'Water'],1549 hp: 60,1550 attack: 115,1551 defense: 105,1552 special_attack: 65,1553 special_defense: 70,1554 speed: 80,1555 },1556 {1557 id: 142,1558 name: 'Aerodactyl',1559 type: ['Rock', 'Flying'],1560 hp: 80,1561 attack: 105,1562 defense: 65,1563 special_attack: 60,1564 special_defense: 75,1565 speed: 130,1566 },1567 {1568 id: 143,1569 name: 'Snorlax',1570 type: ['Normal'],1571 hp: 160,1572 attack: 110,1573 defense: 65,1574 special_attack: 65,1575 special_defense: 110,1576 speed: 30,1577 },1578 {1579 id: 144,1580 name: 'Articuno',1581 type: ['Ice', 'Flying'],1582 hp: 90,1583 attack: 85,1584 defense: 100,1585 special_attack: 95,1586 special_defense: 125,1587 speed: 85,1588 },1589 {1590 id: 145,1591 name: 'Zapdos',1592 type: ['Electric', 'Flying'],1593 hp: 90,1594 attack: 90,1595 defense: 85,1596 special_attack: 125,1597 special_defense: 90,1598 speed: 100,1599 },1600 {1601 id: 146,1602 name: 'Moltres',1603 type: ['Fire', 'Flying'],1604 hp: 90,1605 attack: 100,1606 defense: 90,1607 special_attack: 125,1608 special_defense: 85,1609 speed: 90,1610 },1611 {1612 id: 147,1613 name: 'Dratini',1614 type: ['Dragon'],1615 hp: 41,1616 attack: 64,1617 defense: 45,1618 special_attack: 50,1619 special_defense: 50,1620 speed: 50,1621 },1622 {1623 id: 148,1624 name: 'Dragonair',1625 type: ['Dragon'],1626 hp: 61,1627 attack: 84,1628 defense: 65,1629 special_attack: 70,1630 special_defense: 70,1631 speed: 70,1632 },1633 {1634 id: 149,1635 name: 'Dragonite',1636 type: ['Dragon', 'Flying'],1637 hp: 91,1638 attack: 134,1639 defense: 95,1640 special_attack: 100,1641 special_defense: 100,1642 speed: 80,1643 },1644 {1645 id: 150,1646 name: 'Mewtwo',1647 type: ['Psychic'],1648 hp: 106,1649 attack: 110,1650 defense: 90,1651 special_attack: 154,1652 special_defense: 90,1653 speed: 130,1654 },1655 {1656 id: 151,1657 name: 'Mew',1658 type: ['Psychic'],1659 hp: 100,1660 attack: 100,1661 defense: 100,1662 special_attack: 100,1663 special_defense: 100,1664 speed: 100,1665 },1666 {1667 id: 152,1668 name: 'Chikorita',1669 type: ['Grass'],1670 hp: 45,1671 attack: 49,1672 defense: 65,1673 special_attack: 49,1674 special_defense: 65,1675 speed: 45,1676 },1677 {1678 id: 153,1679 name: 'Bayleef',1680 type: ['Grass'],1681 hp: 60,1682 attack: 62,1683 defense: 80,1684 special_attack: 63,1685 special_defense: 80,1686 speed: 60,1687 },1688 {1689 id: 154,1690 name: 'Meganium',1691 type: ['Grass'],1692 hp: 80,1693 attack: 82,1694 defense: 100,1695 special_attack: 83,1696 special_defense: 100,1697 speed: 80,1698 },1699 {1700 id: 155,1701 name: 'Cyndaquil',1702 type: ['Fire'],1703 hp: 39,1704 attack: 52,1705 defense: 43,1706 special_attack: 60,1707 special_defense: 50,1708 speed: 65,1709 },1710 {1711 id: 156,1712 name: 'Quilava',1713 type: ['Fire'],1714 hp: 58,1715 attack: 64,1716 defense: 58,1717 special_attack: 80,1718 special_defense: 65,1719 speed: 80,1720 },1721 {1722 id: 157,1723 name: 'Typhlosion',1724 type: ['Fire'],1725 hp: 78,1726 attack: 84,1727 defense: 78,1728 special_attack: 109,1729 special_defense: 85,1730 speed: 100,1731 },1732 {1733 id: 158,1734 name: 'Totodile',1735 type: ['Water'],1736 hp: 50,1737 attack: 65,1738 defense: 64,1739 special_attack: 44,1740 special_defense: 48,1741 speed: 43,1742 },1743 {1744 id: 159,1745 name: 'Croconaw',1746 type: ['Water'],1747 hp: 65,1748 attack: 80,1749 defense: 80,1750 special_attack: 59,1751 special_defense: 63,1752 speed: 58,1753 },1754 {1755 id: 160,1756 name: 'Feraligatr',1757 type: ['Water'],1758 hp: 85,1759 attack: 105,1760 defense: 100,1761 special_attack: 79,1762 special_defense: 83,1763 speed: 78,1764 },1765 {1766 id: 161,1767 name: 'Sentret',1768 type: ['Normal'],1769 hp: 35,1770 attack: 46,1771 defense: 34,1772 special_attack: 35,1773 special_defense: 45,1774 speed: 20,1775 },1776 {1777 id: 162,1778 name: 'Furret',1779 type: ['Normal'],1780 hp: 85,1781 attack: 76,1782 defense: 64,1783 special_attack: 45,1784 special_defense: 55,1785 speed: 90,1786 },1787 {1788 id: 163,1789 name: 'Hoothoot',1790 type: ['Normal', 'Flying'],1791 hp: 60,1792 attack: 30,1793 defense: 30,1794 special_attack: 36,1795 special_defense: 56,1796 speed: 50,1797 },1798 {1799 id: 164,1800 name: 'Noctowl',1801 type: ['Normal', 'Flying'],1802 hp: 100,1803 attack: 50,1804 defense: 50,1805 special_attack: 86,1806 special_defense: 96,1807 speed: 70,1808 },1809 {1810 id: 165,1811 name: 'Ledyba',1812 type: ['Bug', 'Flying'],1813 hp: 40,1814 attack: 20,1815 defense: 30,1816 special_attack: 40,1817 special_defense: 80,1818 speed: 55,1819 },1820 {1821 id: 166,1822 name: 'Ledian',1823 type: ['Bug', 'Flying'],1824 hp: 55,1825 attack: 35,1826 defense: 50,1827 special_attack: 55,1828 special_defense: 110,1829 speed: 85,1830 },1831 {1832 id: 167,1833 name: 'Spinarak',1834 type: ['Bug', 'Poison'],1835 hp: 40,1836 attack: 60,1837 defense: 40,1838 special_attack: 40,1839 special_defense: 40,1840 speed: 30,1841 },1842 {1843 id: 168,1844 name: 'Ariados',1845 type: ['Bug', 'Poison'],1846 hp: 70,1847 attack: 90,1848 defense: 70,1849 special_attack: 60,1850 special_defense: 70,1851 speed: 40,1852 },1853 {1854 id: 169,1855 name: 'Crobat',1856 type: ['Poison', 'Flying'],1857 hp: 85,1858 attack: 90,1859 defense: 80,1860 special_attack: 70,1861 special_defense: 80,1862 speed: 130,1863 },1864 {1865 id: 170,1866 name: 'Chinchou',1867 type: ['Water', 'Electric'],1868 hp: 75,1869 attack: 38,1870 defense: 38,1871 special_attack: 56,1872 special_defense: 56,1873 speed: 67,1874 },1875 {1876 id: 171,1877 name: 'Lanturn',1878 type: ['Water', 'Electric'],1879 hp: 125,1880 attack: 58,1881 defense: 58,1882 special_attack: 76,1883 special_defense: 76,1884 speed: 67,1885 },1886 {1887 id: 172,1888 name: 'Pichu',1889 type: ['Electric'],1890 hp: 20,1891 attack: 40,1892 defense: 15,1893 special_attack: 35,1894 special_defense: 35,1895 speed: 60,1896 },1897 {1898 id: 173,1899 name: 'Cleffa',1900 type: ['Fairy'],1901 hp: 50,1902 attack: 25,1903 defense: 28,1904 special_attack: 45,1905 special_defense: 55,1906 speed: 15,1907 },1908 {1909 id: 174,1910 name: 'Igglybuff',1911 type: ['Normal', 'Fairy'],1912 hp: 90,1913 attack: 30,1914 defense: 15,1915 special_attack: 40,1916 special_defense: 20,1917 speed: 15,1918 },1919 {1920 id: 175,1921 name: 'Togepi',1922 type: ['Fairy'],1923 hp: 35,1924 attack: 20,1925 defense: 65,1926 special_attack: 40,1927 special_defense: 65,1928 speed: 20,1929 },1930 {1931 id: 176,1932 name: 'Togetic',1933 type: ['Fairy', 'Flying'],1934 hp: 55,1935 attack: 40,1936 defense: 85,1937 special_attack: 80,1938 special_defense: 105,1939 speed: 40,1940 },1941 {1942 id: 177,1943 name: 'Natu',1944 type: ['Psychic', 'Flying'],1945 hp: 40,1946 attack: 50,1947 defense: 45,1948 special_attack: 70,1949 special_defense: 45,1950 speed: 70,1951 },1952 {1953 id: 178,1954 name: 'Xatu',1955 type: ['Psychic', 'Flying'],1956 hp: 65,1957 attack: 75,1958 defense: 70,1959 special_attack: 95,1960 special_defense: 70,1961 speed: 95,1962 },1963 {1964 id: 179,1965 name: 'Mareep',1966 type: ['Electric'],1967 hp: 55,1968 attack: 40,1969 defense: 40,1970 special_attack: 65,1971 special_defense: 45,1972 speed: 35,1973 },1974 {1975 id: 180,1976 name: 'Flaaffy',1977 type: ['Electric'],1978 hp: 70,1979 attack: 55,1980 defense: 55,1981 special_attack: 80,1982 special_defense: 60,1983 speed: 45,1984 },1985 {1986 id: 181,1987 name: 'Ampharos',1988 type: ['Electric'],1989 hp: 90,1990 attack: 75,1991 defense: 85,1992 special_attack: 115,1993 special_defense: 90,1994 speed: 55,1995 },1996 {1997 id: 182,1998 name: 'Bellossom',1999 type: ['Grass'],2000 hp: 75,2001 attack: 80,2002 defense: 95,2003 special_attack: 90,2004 special_defense: 100,2005 speed: 50,2006 },2007 {2008 id: 183,2009 name: 'Marill',2010 type: ['Water', 'Fairy'],2011 hp: 70,2012 attack: 20,2013 defense: 50,2014 special_attack: 20,2015 special_defense: 50,2016 speed: 40,2017 },2018 {2019 id: 184,2020 name: 'Azumarill',2021 type: ['Water', 'Fairy'],2022 hp: 100,2023 attack: 50,2024 defense: 80,2025 special_attack: 60,2026 special_defense: 80,2027 speed: 50,2028 },2029 {2030 id: 185,2031 name: 'Sudowoodo',2032 type: ['Rock'],2033 hp: 70,2034 attack: 100,2035 defense: 115,2036 special_attack: 30,2037 special_defense: 65,2038 speed: 30,2039 },2040 {2041 id: 186,2042 name: 'Politoed',2043 type: ['Water'],2044 hp: 90,2045 attack: 75,2046 defense: 75,2047 special_attack: 90,2048 special_defense: 100,2049 speed: 70,2050 },2051 {2052 id: 187,2053 name: 'Hoppip',2054 type: ['Grass', 'Flying'],2055 hp: 35,2056 attack: 35,2057 defense: 40,2058 special_attack: 35,2059 special_defense: 55,2060 speed: 50,2061 },2062 {2063 id: 188,2064 name: 'Skiploom',2065 type: ['Grass', 'Flying'],2066 hp: 55,2067 attack: 45,2068 defense: 50,2069 special_attack: 45,2070 special_defense: 65,2071 speed: 80,2072 },2073 {2074 id: 189,2075 name: 'Jumpluff',2076 type: ['Grass', 'Flying'],2077 hp: 75,2078 attack: 55,2079 defense: 70,2080 special_attack: 55,2081 special_defense: 95,2082 speed: 110,2083 },2084 {2085 id: 190,2086 name: 'Aipom',2087 type: ['Normal'],2088 hp: 55,2089 attack: 70,2090 defense: 55,2091 special_attack: 40,2092 special_defense: 55,2093 speed: 85,2094 },2095 {2096 id: 191,2097 name: 'Sunkern',2098 type: ['Grass'],2099 hp: 30,2100 attack: 30,2101 defense: 30,2102 special_attack: 30,2103 special_defense: 30,2104 speed: 30,2105 },2106 {2107 id: 192,2108 name: 'Sunflora',2109 type: ['Grass'],2110 hp: 75,2111 attack: 75,2112 defense: 55,2113 special_attack: 105,2114 special_defense: 85,2115 speed: 30,2116 },2117 {2118 id: 193,2119 name: 'Yanma',2120 type: ['Bug', 'Flying'],2121 hp: 65,2122 attack: 65,2123 defense: 45,2124 special_attack: 75,2125 special_defense: 45,2126 speed: 95,2127 },2128 {2129 id: 194,2130 name: 'Wooper',2131 type: ['Water', 'Ground'],2132 hp: 55,2133 attack: 45,2134 defense: 45,2135 special_attack: 25,2136 special_defense: 25,2137 speed: 15,2138 },2139 {2140 id: 195,2141 name: 'Quagsire',2142 type: ['Water', 'Ground'],2143 hp: 95,2144 attack: 85,2145 defense: 85,2146 special_attack: 65,2147 special_defense: 65,2148 speed: 35,2149 },2150 {2151 id: 196,2152 name: 'Espeon',2153 type: ['Psychic'],2154 hp: 65,2155 attack: 65,2156 defense: 60,2157 special_attack: 130,2158 special_defense: 95,2159 speed: 110,2160 },2161 {2162 id: 197,2163 name: 'Umbreon',2164 type: ['Dark'],2165 hp: 95,2166 attack: 65,2167 defense: 110,2168 special_attack: 60,2169 special_defense: 130,2170 speed: 65,2171 },2172 {2173 id: 198,2174 name: 'Murkrow',2175 type: ['Dark', 'Flying'],2176 hp: 60,2177 attack: 85,2178 defense: 42,2179 special_attack: 85,2180 special_defense: 42,2181 speed: 91,2182 },2183 {2184 id: 199,2185 name: 'Slowking',2186 type: ['Water', 'Psychic'],2187 hp: 95,2188 attack: 75,2189 defense: 80,2190 special_attack: 100,2191 special_defense: 110,2192 speed: 30,2193 },2194 {2195 id: 200,2196 name: 'Misdreavus',2197 type: ['Ghost'],2198 hp: 60,2199 attack: 60,2200 defense: 60,2201 special_attack: 85,2202 special_defense: 85,2203 speed: 85,2204 },2205 {2206 id: 201,2207 name: 'Unown',2208 type: ['Psychic'],2209 hp: 48,2210 attack: 72,2211 defense: 48,2212 special_attack: 72,2213 special_defense: 48,2214 speed: 48,2215 },2216 {2217 id: 202,2218 name: 'Wobbuffet',2219 type: ['Psychic'],2220 hp: 190,2221 attack: 33,2222 defense: 58,2223 special_attack: 33,2224 special_defense: 58,2225 speed: 33,2226 },2227 {2228 id: 203,2229 name: 'Girafarig',2230 type: ['Normal', 'Psychic'],2231 hp: 70,2232 attack: 80,2233 defense: 65,2234 special_attack: 90,2235 special_defense: 65,2236 speed: 85,2237 },2238 {2239 id: 204,2240 name: 'Pineco',2241 type: ['Bug'],2242 hp: 50,2243 attack: 65,2244 defense: 90,2245 special_attack: 35,2246 special_defense: 35,2247 speed: 15,2248 },2249 {2250 id: 205,2251 name: 'Forretress',2252 type: ['Bug', 'Steel'],2253 hp: 75,2254 attack: 90,2255 defense: 140,2256 special_attack: 60,2257 special_defense: 60,2258 speed: 40,2259 },2260 {2261 id: 206,2262 name: 'Dunsparce',2263 type: ['Normal'],2264 hp: 100,2265 attack: 70,2266 defense: 70,2267 special_attack: 65,2268 special_defense: 65,2269 speed: 45,2270 },2271 {2272 id: 207,2273 name: 'Gligar',2274 type: ['Ground', 'Flying'],2275 hp: 65,2276 attack: 75,2277 defense: 105,2278 special_attack: 35,2279 special_defense: 65,2280 speed: 85,2281 },2282 {2283 id: 208,2284 name: 'Steelix',2285 type: ['Steel', 'Ground'],2286 hp: 75,2287 attack: 85,2288 defense: 200,2289 special_attack: 55,2290 special_defense: 65,2291 speed: 30,2292 },2293 {2294 id: 209,2295 name: 'Snubbull',2296 type: ['Fairy'],2297 hp: 60,2298 attack: 80,2299 defense: 50,2300 special_attack: 40,2301 special_defense: 40,2302 speed: 30,2303 },2304 {2305 id: 210,2306 name: 'Granbull',2307 type: ['Fairy'],2308 hp: 90,2309 attack: 120,2310 defense: 75,2311 special_attack: 60,2312 special_defense: 60,2313 speed: 45,2314 },2315 {2316 id: 211,2317 name: 'Qwilfish',2318 type: ['Water', 'Poison'],2319 hp: 65,2320 attack: 95,2321 defense: 85,2322 special_attack: 55,2323 special_defense: 55,2324 speed: 85,2325 },2326 {2327 id: 212,2328 name: 'Scizor',2329 type: ['Bug', 'Steel'],2330 hp: 70,2331 attack: 130,2332 defense: 100,2333 special_attack: 55,2334 special_defense: 80,2335 speed: 65,2336 },2337 {2338 id: 213,2339 name: 'Shuckle',2340 type: ['Bug', 'Rock'],2341 hp: 20,2342 attack: 10,2343 defense: 230,2344 special_attack: 10,2345 special_defense: 230,2346 speed: 5,2347 },2348 {2349 id: 214,2350 name: 'Heracross',2351 type: ['Bug', 'Fighting'],2352 hp: 80,2353 attack: 125,2354 defense: 75,2355 special_attack: 40,2356 special_defense: 95,2357 speed: 85,2358 },2359 {2360 id: 215,2361 name: 'Sneasel',2362 type: ['Dark', 'Ice'],2363 hp: 55,2364 attack: 95,2365 defense: 55,2366 special_attack: 35,2367 special_defense: 75,2368 speed: 115,2369 },2370 {2371 id: 216,2372 name: 'Teddiursa',2373 type: ['Normal'],2374 hp: 60,2375 attack: 80,2376 defense: 50,2377 special_attack: 50,2378 special_defense: 50,2379 speed: 40,2380 },2381 {2382 id: 217,2383 name: 'Ursaring',2384 type: ['Normal'],2385 hp: 90,2386 attack: 130,2387 defense: 75,2388 special_attack: 75,2389 special_defense: 75,2390 speed: 55,2391 },2392 {2393 id: 218,2394 name: 'Slugma',2395 type: ['Fire'],2396 hp: 40,2397 attack: 40,2398 defense: 40,2399 special_attack: 70,2400 special_defense: 40,2401 speed: 20,2402 },2403 {2404 id: 219,2405 name: 'Magcargo',2406 type: ['Fire', 'Rock'],2407 hp: 60,2408 attack: 50,2409 defense: 120,2410 special_attack: 90,2411 special_defense: 80,2412 speed: 30,2413 },2414 {2415 id: 220,2416 name: 'Swinub',2417 type: ['Ice', 'Ground'],2418 hp: 50,2419 attack: 50,2420 defense: 40,2421 special_attack: 30,2422 special_defense: 30,2423 speed: 50,2424 },2425 {2426 id: 221,2427 name: 'Piloswine',2428 type: ['Ice', 'Ground'],2429 hp: 100,2430 attack: 100,2431 defense: 80,2432 special_attack: 60,2433 special_defense: 60,2434 speed: 50,2435 },2436 {2437 id: 222,2438 name: 'Corsola',2439 type: ['Water', 'Rock'],2440 hp: 65,2441 attack: 55,2442 defense: 95,2443 special_attack: 65,2444 special_defense: 95,2445 speed: 35,2446 },2447 {2448 id: 223,2449 name: 'Remoraid',2450 type: ['Water'],2451 hp: 35,2452 attack: 65,2453 defense: 35,2454 special_attack: 65,2455 special_defense: 35,2456 speed: 65,2457 },2458 {2459 id: 224,2460 name: 'Octillery',2461 type: ['Water'],2462 hp: 75,2463 attack: 105,2464 defense: 75,2465 special_attack: 105,2466 special_defense: 75,2467 speed: 45,2468 },2469 {2470 id: 225,2471 name: 'Delibird',2472 type: ['Ice', 'Flying'],2473 hp: 45,2474 attack: 55,2475 defense: 45,2476 special_attack: 65,2477 special_defense: 45,2478 speed: 75,2479 },2480 {2481 id: 226,2482 name: 'Mantine',2483 type: ['Water', 'Flying'],2484 hp: 85,2485 attack: 40,2486 defense: 70,2487 special_attack: 80,2488 special_defense: 140,2489 speed: 70,2490 },2491 {2492 id: 227,2493 name: 'Skarmory',2494 type: ['Steel', 'Flying'],2495 hp: 65,2496 attack: 80,2497 defense: 140,2498 special_attack: 40,2499 special_defense: 70,2500 speed: 70,2501 },2502 {2503 id: 228,2504 name: 'Houndour',2505 type: ['Dark', 'Fire'],2506 hp: 45,2507 attack: 60,2508 defense: 30,2509 special_attack: 80,2510 special_defense: 50,2511 speed: 65,2512 },2513 {2514 id: 229,2515 name: 'Houndoom',2516 type: ['Dark', 'Fire'],2517 hp: 75,2518 attack: 90,2519 defense: 50,2520 special_attack: 110,2521 special_defense: 80,2522 speed: 95,2523 },2524 {2525 id: 230,2526 name: 'Kingdra',2527 type: ['Water', 'Dragon'],2528 hp: 75,2529 attack: 95,2530 defense: 95,2531 special_attack: 95,2532 special_defense: 95,2533 speed: 85,2534 },2535 {2536 id: 231,2537 name: 'Phanpy',2538 type: ['Ground'],2539 hp: 90,2540 attack: 60,2541 defense: 60,2542 special_attack: 40,2543 special_defense: 40,2544 speed: 40,2545 },2546 {2547 id: 232,2548 name: 'Donphan',2549 type: ['Ground'],2550 hp: 90,2551 attack: 120,2552 defense: 120,2553 special_attack: 60,2554 special_defense: 60,2555 speed: 50,2556 },2557 {2558 id: 233,2559 name: 'Porygon2',2560 type: ['Normal'],2561 hp: 85,2562 attack: 80,2563 defense: 90,2564 special_attack: 105,2565 special_defense: 95,2566 speed: 60,2567 },2568 {2569 id: 234,2570 name: 'Stantler',2571 type: ['Normal'],2572 hp: 73,2573 attack: 95,2574 defense: 62,2575 special_attack: 85,2576 special_defense: 65,2577 speed: 85,2578 },2579 {2580 id: 235,2581 name: 'Smeargle',2582 type: ['Normal'],2583 hp: 55,2584 attack: 20,2585 defense: 35,2586 special_attack: 20,2587 special_defense: 45,2588 speed: 75,2589 },2590 {2591 id: 236,2592 name: 'Tyrogue',2593 type: ['Fighting'],2594 hp: 35,2595 attack: 35,2596 defense: 35,2597 special_attack: 35,2598 special_defense: 35,2599 speed: 35,2600 },2601 {2602 id: 237,2603 name: 'Hitmontop',2604 type: ['Fighting'],2605 hp: 50,2606 attack: 95,2607 defense: 95,2608 special_attack: 35,2609 special_defense: 110,2610 speed: 70,2611 },2612 {2613 id: 238,2614 name: 'Smoochum',2615 type: ['Ice', 'Psychic'],2616 hp: 45,2617 attack: 30,2618 defense: 15,2619 special_attack: 85,2620 special_defense: 65,2621 speed: 65,2622 },2623 {2624 id: 239,2625 name: 'Elekid',2626 type: ['Electric'],2627 hp: 45,2628 attack: 63,2629 defense: 37,2630 special_attack: 65,2631 special_defense: 55,2632 speed: 95,2633 },2634 {2635 id: 240,2636 name: 'Magby',2637 type: ['Fire'],2638 hp: 45,2639 attack: 75,2640 defense: 37,2641 special_attack: 70,2642 special_defense: 55,2643 speed: 83,2644 },2645 {2646 id: 241,2647 name: 'Miltank',2648 type: ['Normal'],2649 hp: 95,2650 attack: 80,2651 defense: 105,2652 special_attack: 40,2653 special_defense: 70,2654 speed: 100,2655 },2656 {2657 id: 242,2658 name: 'Blissey',2659 type: ['Normal'],2660 hp: 255,2661 attack: 10,2662 defense: 10,2663 special_attack: 75,2664 special_defense: 135,2665 speed: 55,2666 },2667 {2668 id: 243,2669 name: 'Raikou',2670 type: ['Electric'],2671 hp: 90,2672 attack: 85,2673 defense: 75,2674 special_attack: 115,2675 special_defense: 100,2676 speed: 115,2677 },2678 {2679 id: 244,2680 name: 'Entei',2681 type: ['Fire'],2682 hp: 115,2683 attack: 115,2684 defense: 85,2685 special_attack: 90,2686 special_defense: 75,2687 speed: 100,2688 },2689 {2690 id: 245,2691 name: 'Suicune',2692 type: ['Water'],2693 hp: 100,2694 attack: 75,2695 defense: 115,2696 special_attack: 90,2697 special_defense: 115,2698 speed: 85,2699 },2700 {2701 id: 246,2702 name: 'Larvitar',2703 type: ['Rock', 'Ground'],2704 hp: 50,2705 attack: 64,2706 defense: 50,2707 special_attack: 45,2708 special_defense: 50,2709 speed: 41,2710 },2711 {2712 id: 247,2713 name: 'Pupitar',2714 type: ['Rock', 'Ground'],2715 hp: 70,2716 attack: 84,2717 defense: 70,2718 special_attack: 65,2719 special_defense: 70,2720 speed: 51,2721 },2722 {2723 id: 248,2724 name: 'Tyranitar',2725 type: ['Rock', 'Dark'],2726 hp: 100,2727 attack: 134,2728 defense: 110,2729 special_attack: 95,2730 special_defense: 100,2731 speed: 61,2732 },2733 {2734 id: 249,2735 name: 'Lugia',2736 type: ['Psychic', 'Flying'],2737 hp: 106,2738 attack: 90,2739 defense: 130,2740 special_attack: 90,2741 special_defense: 154,2742 speed: 110,2743 },2744 {2745 id: 250,2746 name: 'Ho-Oh',2747 type: ['Fire', 'Flying'],2748 hp: 106,2749 attack: 130,2750 defense: 90,2751 special_attack: 110,2752 special_defense: 154,2753 speed: 90,2754 },2755 {2756 id: 251,2757 name: 'Celebi',2758 type: ['Psychic', 'Grass'],2759 hp: 100,2760 attack: 100,2761 defense: 100,2762 special_attack: 100,2763 special_defense: 100,2764 speed: 100,2765 },2766 {2767 id: 252,2768 name: 'Treecko',2769 type: ['Grass'],2770 hp: 40,2771 attack: 45,2772 defense: 35,2773 special_attack: 65,2774 special_defense: 55,2775 speed: 70,2776 },2777 {2778 id: 253,2779 name: 'Grovyle',2780 type: ['Grass'],2781 hp: 50,2782 attack: 65,2783 defense: 45,2784 special_attack: 85,2785 special_defense: 65,2786 speed: 95,2787 },2788 {2789 id: 254,2790 name: 'Sceptile',2791 type: ['Grass'],2792 hp: 70,2793 attack: 85,2794 defense: 65,2795 special_attack: 105,2796 special_defense: 85,2797 speed: 120,2798 },2799 {2800 id: 255,2801 name: 'Torchic',2802 type: ['Fire'],2803 hp: 45,2804 attack: 60,2805 defense: 40,2806 special_attack: 70,2807 special_defense: 50,2808 speed: 45,2809 },2810 {2811 id: 256,2812 name: 'Combusken',2813 type: ['Fire', 'Fighting'],2814 hp: 60,2815 attack: 85,2816 defense: 60,2817 special_attack: 85,2818 special_defense: 60,2819 speed: 55,2820 },2821 {2822 id: 257,2823 name: 'Blaziken',2824 type: ['Fire', 'Fighting'],2825 hp: 80,2826 attack: 120,2827 defense: 70,2828 special_attack: 110,2829 special_defense: 70,2830 speed: 80,2831 },2832 {2833 id: 258,2834 name: 'Mudkip',2835 type: ['Water'],2836 hp: 50,2837 attack: 70,2838 defense: 50,2839 special_attack: 50,2840 special_defense: 50,2841 speed: 40,2842 },2843 {2844 id: 259,2845 name: 'Marshtomp',2846 type: ['Water', 'Ground'],2847 hp: 70,2848 attack: 85,2849 defense: 70,2850 special_attack: 60,2851 special_defense: 70,2852 speed: 50,2853 },2854 {2855 id: 260,2856 name: 'Swampert',2857 type: ['Water', 'Ground'],2858 hp: 100,2859 attack: 110,2860 defense: 90,2861 special_attack: 85,2862 special_defense: 90,2863 speed: 60,2864 },2865 {2866 id: 261,2867 name: 'Poochyena',2868 type: ['Dark'],2869 hp: 35,2870 attack: 55,2871 defense: 35,2872 special_attack: 30,2873 special_defense: 30,2874 speed: 35,2875 },2876 {2877 id: 262,2878 name: 'Mightyena',2879 type: ['Dark'],2880 hp: 70,2881 attack: 90,2882 defense: 70,2883 special_attack: 60,2884 special_defense: 60,2885 speed: 70,2886 },2887 {2888 id: 263,2889 name: 'Zigzagoon',2890 type: ['Normal'],2891 hp: 38,2892 attack: 30,2893 defense: 41,2894 special_attack: 30,2895 special_defense: 41,2896 speed: 60,2897 },2898 {2899 id: 264,2900 name: 'Linoone',2901 type: ['Normal'],2902 hp: 78,2903 attack: 70,2904 defense: 61,2905 special_attack: 50,2906 special_defense: 61,2907 speed: 100,2908 },2909 {2910 id: 265,2911 name: 'Wurmple',2912 type: ['Bug'],2913 hp: 45,2914 attack: 45,2915 defense: 35,2916 special_attack: 20,2917 special_defense: 30,2918 speed: 20,2919 },2920 {2921 id: 266,2922 name: 'Silcoon',2923 type: ['Bug'],2924 hp: 50,2925 attack: 35,2926 defense: 55,2927 special_attack: 25,2928 special_defense: 25,2929 speed: 15,2930 },2931 {2932 id: 267,2933 name: 'Beautifly',2934 type: ['Bug', 'Flying'],2935 hp: 60,2936 attack: 70,2937 defense: 50,2938 special_attack: 100,2939 special_defense: 50,2940 speed: 65,2941 },2942 {2943 id: 268,2944 name: 'Cascoon',2945 type: ['Bug'],2946 hp: 50,2947 attack: 35,2948 defense: 55,2949 special_attack: 25,2950 special_defense: 25,2951 speed: 15,2952 },2953 {2954 id: 269,2955 name: 'Dustox',2956 type: ['Bug', 'Poison'],2957 hp: 60,2958 attack: 50,2959 defense: 70,2960 special_attack: 50,2961 special_defense: 90,2962 speed: 65,2963 },2964 {2965 id: 270,2966 name: 'Lotad',2967 type: ['Water', 'Grass'],2968 hp: 40,2969 attack: 30,2970 defense: 30,2971 special_attack: 40,2972 special_defense: 50,2973 speed: 30,2974 },2975 {2976 id: 271,2977 name: 'Lombre',2978 type: ['Water', 'Grass'],2979 hp: 60,2980 attack: 50,2981 defense: 50,2982 special_attack: 60,2983 special_defense: 70,2984 speed: 50,2985 },2986 {2987 id: 272,2988 name: 'Ludicolo',2989 type: ['Water', 'Grass'],2990 hp: 80,2991 attack: 70,2992 defense: 70,2993 special_attack: 90,2994 special_defense: 100,2995 speed: 70,2996 },2997 {2998 id: 273,2999 name: 'Seedot',3000 type: ['Grass'],3001 hp: 40,3002 attack: 40,3003 defense: 50,3004 special_attack: 30,3005 special_defense: 30,3006 speed: 30,3007 },3008 {3009 id: 274,3010 name: 'Nuzleaf',3011 type: ['Grass', 'Dark'],3012 hp: 70,3013 attack: 70,3014 defense: 40,3015 special_attack: 60,3016 special_defense: 40,3017 speed: 60,3018 },3019 {3020 id: 275,3021 name: 'Shiftry',3022 type: ['Grass', 'Dark'],3023 hp: 90,3024 attack: 100,3025 defense: 60,3026 special_attack: 90,3027 special_defense: 60,3028 speed: 80,3029 },3030 {3031 id: 276,3032 name: 'Taillow',3033 type: ['Normal', 'Flying'],3034 hp: 40,3035 attack: 55,3036 defense: 30,3037 special_attack: 30,3038 special_defense: 30,3039 speed: 85,3040 },3041 {3042 id: 277,3043 name: 'Swellow',3044 type: ['Normal', 'Flying'],3045 hp: 60,3046 attack: 85,3047 defense: 60,3048 special_attack: 75,3049 special_defense: 50,3050 speed: 125,3051 },3052 {3053 id: 278,3054 name: 'Wingull',3055 type: ['Water', 'Flying'],3056 hp: 40,3057 attack: 30,3058 defense: 30,3059 special_attack: 55,3060 special_defense: 30,3061 speed: 85,3062 },3063 {3064 id: 279,3065 name: 'Pelipper',3066 type: ['Water', 'Flying'],3067 hp: 60,3068 attack: 50,3069 defense: 100,3070 special_attack: 95,3071 special_defense: 70,3072 speed: 65,3073 },3074 {3075 id: 280,3076 name: 'Ralts',3077 type: ['Psychic', 'Fairy'],3078 hp: 28,3079 attack: 25,3080 defense: 25,3081 special_attack: 45,3082 special_defense: 35,3083 speed: 40,3084 },3085 {3086 id: 281,3087 name: 'Kirlia',3088 type: ['Psychic', 'Fairy'],3089 hp: 38,3090 attack: 35,3091 defense: 35,3092 special_attack: 65,3093 special_defense: 55,3094 speed: 50,3095 },3096 {3097 id: 282,3098 name: 'Gardevoir',3099 type: ['Psychic', 'Fairy'],3100 hp: 68,3101 attack: 65,3102 defense: 65,3103 special_attack: 125,3104 special_defense: 115,3105 speed: 80,3106 },3107 {3108 id: 283,3109 name: 'Surskit',3110 type: ['Bug', 'Water'],3111 hp: 40,3112 attack: 30,3113 defense: 32,3114 special_attack: 50,3115 special_defense: 52,3116 speed: 65,3117 },3118 {3119 id: 284,3120 name: 'Masquerain',3121 type: ['Bug', 'Flying'],3122 hp: 70,3123 attack: 60,3124 defense: 62,3125 special_attack: 100,3126 special_defense: 82,3127 speed: 80,3128 },3129 {3130 id: 285,3131 name: 'Shroomish',3132 type: ['Grass'],3133 hp: 60,3134 attack: 40,3135 defense: 60,3136 special_attack: 40,3137 special_defense: 60,3138 speed: 35,3139 },3140 {3141 id: 286,3142 name: 'Breloom',3143 type: ['Grass', 'Fighting'],3144 hp: 60,3145 attack: 130,3146 defense: 80,3147 special_attack: 60,3148 special_defense: 60,3149 speed: 70,3150 },3151 {3152 id: 287,3153 name: 'Slakoth',3154 type: ['Normal'],3155 hp: 60,3156 attack: 60,3157 defense: 60,3158 special_attack: 35,3159 special_defense: 35,3160 speed: 30,3161 },3162 {3163 id: 288,3164 name: 'Vigoroth',3165 type: ['Normal'],3166 hp: 80,3167 attack: 80,3168 defense: 80,3169 special_attack: 55,3170 special_defense: 55,3171 speed: 90,3172 },3173 {3174 id: 289,3175 name: 'Slaking',3176 type: ['Normal'],3177 hp: 150,3178 attack: 160,3179 defense: 100,3180 special_attack: 95,3181 special_defense: 65,3182 speed: 100,3183 },3184 {3185 id: 290,3186 name: 'Nincada',3187 type: ['Bug', 'Ground'],3188 hp: 31,3189 attack: 45,3190 defense: 90,3191 special_attack: 30,3192 special_defense: 30,3193 speed: 40,3194 },3195 {3196 id: 291,3197 name: 'Ninjask',3198 type: ['Bug', 'Flying'],3199 hp: 61,3200 attack: 90,3201 defense: 45,3202 special_attack: 50,3203 special_defense: 50,3204 speed: 160,3205 },3206 {3207 id: 292,3208 name: 'Shedinja',3209 type: ['Bug', 'Ghost'],3210 hp: 1,3211 attack: 90,3212 defense: 45,3213 special_attack: 30,3214 special_defense: 30,3215 speed: 40,3216 },3217 {3218 id: 293,3219 name: 'Whismur',3220 type: ['Normal'],3221 hp: 64,3222 attack: 51,3223 defense: 23,3224 special_attack: 51,3225 special_defense: 23,3226 speed: 28,3227 },3228 {3229 id: 294,3230 name: 'Loudred',3231 type: ['Normal'],3232 hp: 84,3233 attack: 71,3234 defense: 43,3235 special_attack: 71,3236 special_defense: 43,3237 speed: 48,3238 },3239 {3240 id: 295,3241 name: 'Exploud',3242 type: ['Normal'],3243 hp: 104,3244 attack: 91,3245 defense: 63,3246 special_attack: 91,3247 special_defense: 73,3248 speed: 68,3249 },3250 {3251 id: 296,3252 name: 'Makuhita',3253 type: ['Fighting'],3254 hp: 72,3255 attack: 60,3256 defense: 30,3257 special_attack: 20,3258 special_defense: 30,3259 speed: 25,3260 },3261 {3262 id: 297,3263 name: 'Hariyama',3264 type: ['Fighting'],3265 hp: 144,3266 attack: 120,3267 defense: 60,3268 special_attack: 40,3269 special_defense: 60,3270 speed: 50,3271 },3272 {3273 id: 298,3274 name: 'Azurill',3275 type: ['Normal', 'Fairy'],3276 hp: 50,3277 attack: 20,3278 defense: 40,3279 special_attack: 20,3280 special_defense: 40,3281 speed: 20,3282 },3283 {3284 id: 299,3285 name: 'Nosepass',3286 type: ['Rock'],3287 hp: 30,3288 attack: 45,3289 defense: 135,3290 special_attack: 45,3291 special_defense: 90,3292 speed: 30,3293 },3294 {3295 id: 300,3296 name: 'Skitty',3297 type: ['Normal'],3298 hp: 50,3299 attack: 45,3300 defense: 45,3301 special_attack: 35,3302 special_defense: 35,3303 speed: 50,3304 },3305 {3306 id: 301,3307 name: 'Delcatty',3308 type: ['Normal'],3309 hp: 70,3310 attack: 65,3311 defense: 65,3312 special_attack: 55,3313 special_defense: 55,3314 speed: 90,3315 },3316 {3317 id: 302,3318 name: 'Sableye',3319 type: ['Dark', 'Ghost'],3320 hp: 50,3321 attack: 75,3322 defense: 75,3323 special_attack: 65,3324 special_defense: 65,3325 speed: 50,3326 },3327 {3328 id: 303,3329 name: 'Mawile',3330 type: ['Steel', 'Fairy'],3331 hp: 50,3332 attack: 85,3333 defense: 85,3334 special_attack: 55,3335 special_defense: 55,3336 speed: 50,3337 },3338 {3339 id: 304,3340 name: 'Aron',3341 type: ['Steel', 'Rock'],3342 hp: 50,3343 attack: 70,3344 defense: 100,3345 special_attack: 40,3346 special_defense: 40,3347 speed: 30,3348 },3349 {3350 id: 305,3351 name: 'Lairon',3352 type: ['Steel', 'Rock'],3353 hp: 60,3354 attack: 90,3355 defense: 140,3356 special_attack: 50,3357 special_defense: 50,3358 speed: 40,3359 },3360 {3361 id: 306,3362 name: 'Aggron',3363 type: ['Steel', 'Rock'],3364 hp: 70,3365 attack: 110,3366 defense: 180,3367 special_attack: 60,3368 special_defense: 60,3369 speed: 50,3370 },3371 {3372 id: 307,3373 name: 'Meditite',3374 type: ['Fighting', 'Psychic'],3375 hp: 30,3376 attack: 40,3377 defense: 55,3378 special_attack: 40,3379 special_defense: 55,3380 speed: 60,3381 },3382 {3383 id: 308,3384 name: 'Medicham',3385 type: ['Fighting', 'Psychic'],3386 hp: 60,3387 attack: 60,3388 defense: 75,3389 special_attack: 60,3390 special_defense: 75,3391 speed: 80,3392 },3393 {3394 id: 309,3395 name: 'Electrike',3396 type: ['Electric'],3397 hp: 40,3398 attack: 45,3399 defense: 40,3400 special_attack: 65,3401 special_defense: 40,3402 speed: 65,3403 },3404 {3405 id: 310,3406 name: 'Manectric',3407 type: ['Electric'],3408 hp: 70,3409 attack: 75,3410 defense: 60,3411 special_attack: 105,3412 special_defense: 60,3413 speed: 105,3414 },3415 {3416 id: 311,3417 name: 'Plusle',3418 type: ['Electric'],3419 hp: 60,3420 attack: 50,3421 defense: 40,3422 special_attack: 85,3423 special_defense: 75,3424 speed: 95,3425 },3426 {3427 id: 312,3428 name: 'Minun',3429 type: ['Electric'],3430 hp: 60,3431 attack: 40,3432 defense: 50,3433 special_attack: 75,3434 special_defense: 85,3435 speed: 95,3436 },3437 {3438 id: 313,3439 name: 'Volbeat',3440 type: ['Bug'],3441 hp: 65,3442 attack: 73,3443 defense: 75,3444 special_attack: 47,3445 special_defense: 85,3446 speed: 85,3447 },3448 {3449 id: 314,3450 name: 'Illumise',3451 type: ['Bug'],3452 hp: 65,3453 attack: 47,3454 defense: 75,3455 special_attack: 73,3456 special_defense: 85,3457 speed: 85,3458 },3459 {3460 id: 315,3461 name: 'Roselia',3462 type: ['Grass', 'Poison'],3463 hp: 50,3464 attack: 60,3465 defense: 45,3466 special_attack: 100,3467 special_defense: 80,3468 speed: 65,3469 },3470 {3471 id: 316,3472 name: 'Gulpin',3473 type: ['Poison'],3474 hp: 70,3475 attack: 43,3476 defense: 53,3477 special_attack: 43,3478 special_defense: 53,3479 speed: 40,3480 },3481 {3482 id: 317,3483 name: 'Swalot',3484 type: ['Poison'],3485 hp: 100,3486 attack: 73,3487 defense: 83,3488 special_attack: 73,3489 special_defense: 83,3490 speed: 55,3491 },3492 {3493 id: 318,3494 name: 'Carvanha',3495 type: ['Water', 'Dark'],3496 hp: 45,3497 attack: 90,3498 defense: 20,3499 special_attack: 65,3500 special_defense: 20,3501 speed: 65,3502 },3503 {3504 id: 319,3505 name: 'Sharpedo',3506 type: ['Water', 'Dark'],3507 hp: 70,3508 attack: 120,3509 defense: 40,3510 special_attack: 95,3511 special_defense: 40,3512 speed: 95,3513 },3514 {3515 id: 320,3516 name: 'Wailmer',3517 type: ['Water'],3518 hp: 130,3519 attack: 70,3520 defense: 35,3521 special_attack: 70,3522 special_defense: 35,3523 speed: 60,3524 },3525 {3526 id: 321,3527 name: 'Wailord',3528 type: ['Water'],3529 hp: 170,3530 attack: 90,3531 defense: 45,3532 special_attack: 90,3533 special_defense: 45,3534 speed: 60,3535 },3536 {3537 id: 322,3538 name: 'Numel',3539 type: ['Fire', 'Ground'],3540 hp: 60,3541 attack: 60,3542 defense: 40,3543 special_attack: 65,3544 special_defense: 45,3545 speed: 35,3546 },3547 {3548 id: 323,3549 name: 'Camerupt',3550 type: ['Fire', 'Ground'],3551 hp: 70,3552 attack: 100,3553 defense: 70,3554 special_attack: 105,3555 special_defense: 75,3556 speed: 40,3557 },3558 {3559 id: 324,3560 name: 'Torkoal',3561 type: ['Fire'],3562 hp: 70,3563 attack: 85,3564 defense: 140,3565 special_attack: 85,3566 special_defense: 70,3567 speed: 20,3568 },3569 {3570 id: 325,3571 name: 'Spoink',3572 type: ['Psychic'],3573 hp: 60,3574 attack: 25,3575 defense: 35,3576 special_attack: 70,3577 special_defense: 80,3578 speed: 60,3579 },3580 {3581 id: 326,3582 name: 'Grumpig',3583 type: ['Psychic'],3584 hp: 80,3585 attack: 45,3586 defense: 65,3587 special_attack: 90,3588 special_defense: 110,3589 speed: 80,3590 },3591 {3592 id: 327,3593 name: 'Spinda',3594 type: ['Normal'],3595 hp: 60,3596 attack: 60,3597 defense: 60,3598 special_attack: 60,3599 special_defense: 60,3600 speed: 60,3601 },3602 {3603 id: 328,3604 name: 'Trapinch',3605 type: ['Ground'],3606 hp: 45,3607 attack: 100,3608 defense: 45,3609 special_attack: 45,3610 special_defense: 45,3611 speed: 10,3612 },3613 {3614 id: 329,3615 name: 'Vibrava',3616 type: ['Ground', 'Dragon'],3617 hp: 50,3618 attack: 70,3619 defense: 50,3620 special_attack: 50,3621 special_defense: 50,3622 speed: 70,3623 },3624 {3625 id: 330,3626 name: 'Flygon',3627 type: ['Ground', 'Dragon'],3628 hp: 80,3629 attack: 100,3630 defense: 80,3631 special_attack: 80,3632 special_defense: 80,3633 speed: 100,3634 },3635 {3636 id: 331,3637 name: 'Cacnea',3638 type: ['Grass'],3639 hp: 50,3640 attack: 85,3641 defense: 40,3642 special_attack: 85,3643 special_defense: 40,3644 speed: 35,3645 },3646 {3647 id: 332,3648 name: 'Cacturne',3649 type: ['Grass', 'Dark'],3650 hp: 70,3651 attack: 115,3652 defense: 60,3653 special_attack: 115,3654 special_defense: 60,3655 speed: 55,3656 },3657 {3658 id: 333,3659 name: 'Swablu',3660 type: ['Normal', 'Flying'],3661 hp: 45,3662 attack: 40,3663 defense: 60,3664 special_attack: 40,3665 special_defense: 75,3666 speed: 50,3667 },3668 {3669 id: 334,3670 name: 'Altaria',3671 type: ['Dragon', 'Flying'],3672 hp: 75,3673 attack: 70,3674 defense: 90,3675 special_attack: 70,3676 special_defense: 105,3677 speed: 80,3678 },3679 {3680 id: 335,3681 name: 'Zangoose',3682 type: ['Normal'],3683 hp: 73,3684 attack: 115,3685 defense: 60,3686 special_attack: 60,3687 special_defense: 60,3688 speed: 90,3689 },3690 {3691 id: 336,3692 name: 'Seviper',3693 type: ['Poison'],3694 hp: 73,3695 attack: 100,3696 defense: 60,3697 special_attack: 100,3698 special_defense: 60,3699 speed: 65,3700 },3701 {3702 id: 337,3703 name: 'Lunatone',3704 type: ['Rock', 'Psychic'],3705 hp: 90,3706 attack: 55,3707 defense: 65,3708 special_attack: 95,3709 special_defense: 85,3710 speed: 70,3711 },3712 {3713 id: 338,3714 name: 'Solrock',3715 type: ['Rock', 'Psychic'],3716 hp: 90,3717 attack: 95,3718 defense: 85,3719 special_attack: 55,3720 special_defense: 65,3721 speed: 70,3722 },3723 {3724 id: 339,3725 name: 'Barboach',3726 type: ['Water', 'Ground'],3727 hp: 50,3728 attack: 48,3729 defense: 43,3730 special_attack: 46,3731 special_defense: 41,3732 speed: 60,3733 },3734 {3735 id: 340,3736 name: 'Whiscash',3737 type: ['Water', 'Ground'],3738 hp: 110,3739 attack: 78,3740 defense: 73,3741 special_attack: 76,3742 special_defense: 71,3743 speed: 60,3744 },3745 {3746 id: 341,3747 name: 'Corphish',3748 type: ['Water'],3749 hp: 43,3750 attack: 80,3751 defense: 65,3752 special_attack: 50,3753 special_defense: 35,3754 speed: 35,3755 },3756 {3757 id: 342,3758 name: 'Crawdaunt',3759 type: ['Water', 'Dark'],3760 hp: 63,3761 attack: 120,3762 defense: 85,3763 special_attack: 90,3764 special_defense: 55,3765 speed: 55,3766 },3767 {3768 id: 343,3769 name: 'Baltoy',3770 type: ['Ground', 'Psychic'],3771 hp: 40,3772 attack: 40,3773 defense: 55,3774 special_attack: 40,3775 special_defense: 70,3776 speed: 55,3777 },3778 {3779 id: 344,3780 name: 'Claydol',3781 type: ['Ground', 'Psychic'],3782 hp: 60,3783 attack: 70,3784 defense: 105,3785 special_attack: 70,3786 special_defense: 120,3787 speed: 75,3788 },3789 {3790 id: 345,3791 name: 'Lileep',3792 type: ['Rock', 'Grass'],3793 hp: 66,3794 attack: 41,3795 defense: 77,3796 special_attack: 61,3797 special_defense: 87,3798 speed: 23,3799 },3800 {3801 id: 346,3802 name: 'Cradily',3803 type: ['Rock', 'Grass'],3804 hp: 86,3805 attack: 81,3806 defense: 97,3807 special_attack: 81,3808 special_defense: 107,3809 speed: 43,3810 },3811 {3812 id: 347,3813 name: 'Anorith',3814 type: ['Rock', 'Bug'],3815 hp: 45,3816 attack: 95,3817 defense: 50,3818 special_attack: 40,3819 special_defense: 50,3820 speed: 75,3821 },3822 {3823 id: 348,3824 name: 'Armaldo',3825 type: ['Rock', 'Bug'],3826 hp: 75,3827 attack: 125,3828 defense: 100,3829 special_attack: 70,3830 special_defense: 80,3831 speed: 45,3832 },3833 {3834 id: 349,3835 name: 'Feebas',3836 type: ['Water'],3837 hp: 20,3838 attack: 15,3839 defense: 20,3840 special_attack: 10,3841 special_defense: 55,3842 speed: 80,3843 },3844 {3845 id: 350,3846 name: 'Milotic',3847 type: ['Water'],3848 hp: 95,3849 attack: 60,3850 defense: 79,3851 special_attack: 100,3852 special_defense: 125,3853 speed: 81,3854 },3855 {3856 id: 351,3857 name: 'Castform',3858 type: ['Normal'],3859 hp: 70,3860 attack: 70,3861 defense: 70,3862 special_attack: 70,3863 special_defense: 70,3864 speed: 70,3865 },3866 {3867 id: 352,3868 name: 'Kecleon',3869 type: ['Normal'],3870 hp: 60,3871 attack: 90,3872 defense: 70,3873 special_attack: 60,3874 special_defense: 120,3875 speed: 40,3876 },3877 {3878 id: 353,3879 name: 'Shuppet',3880 type: ['Ghost'],3881 hp: 44,3882 attack: 75,3883 defense: 35,3884 special_attack: 63,3885 special_defense: 33,3886 speed: 45,3887 },3888 {3889 id: 354,3890 name: 'Banette',3891 type: ['Ghost'],3892 hp: 64,3893 attack: 115,3894 defense: 65,3895 special_attack: 83,3896 special_defense: 63,3897 speed: 65,3898 },3899 {3900 id: 355,3901 name: 'Duskull',3902 type: ['Ghost'],3903 hp: 20,3904 attack: 40,3905 defense: 90,3906 special_attack: 30,3907 special_defense: 90,3908 speed: 25,3909 },3910 {3911 id: 356,3912 name: 'Dusclops',3913 type: ['Ghost'],3914 hp: 40,3915 attack: 70,3916 defense: 130,3917 special_attack: 60,3918 special_defense: 130,3919 speed: 25,3920 },3921 {3922 id: 357,3923 name: 'Tropius',3924 type: ['Grass', 'Flying'],3925 hp: 99,3926 attack: 68,3927 defense: 83,3928 special_attack: 72,3929 special_defense: 87,3930 speed: 51,3931 },3932 {3933 id: 358,3934 name: 'Chimecho',3935 type: ['Psychic'],3936 hp: 75,3937 attack: 50,3938 defense: 80,3939 special_attack: 95,3940 special_defense: 90,3941 speed: 65,3942 },3943 {3944 id: 359,3945 name: 'Absol',3946 type: ['Dark'],3947 hp: 65,3948 attack: 130,3949 defense: 60,3950 special_attack: 75,3951 special_defense: 60,3952 speed: 75,3953 },3954 {3955 id: 360,3956 name: 'Wynaut',3957 type: ['Psychic'],3958 hp: 95,3959 attack: 23,3960 defense: 48,3961 special_attack: 23,3962 special_defense: 48,3963 speed: 23,3964 },3965 {3966 id: 361,3967 name: 'Snorunt',3968 type: ['Ice'],3969 hp: 50,3970 attack: 50,3971 defense: 50,3972 special_attack: 50,3973 special_defense: 50,3974 speed: 50,3975 },3976 {3977 id: 362,3978 name: 'Glalie',3979 type: ['Ice'],3980 hp: 80,3981 attack: 80,3982 defense: 80,3983 special_attack: 80,3984 special_defense: 80,3985 speed: 80,3986 },3987 {3988 id: 363,3989 name: 'Spheal',3990 type: ['Ice', 'Water'],3991 hp: 70,3992 attack: 40,3993 defense: 50,3994 special_attack: 55,3995 special_defense: 50,3996 speed: 25,3997 },3998 {3999 id: 364,4000 name: 'Sealeo',4001 type: ['Ice', 'Water'],4002 hp: 90,4003 attack: 60,4004 defense: 70,4005 special_attack: 75,4006 special_defense: 70,4007 speed: 45,4008 },4009 {4010 id: 365,4011 name: 'Walrein',4012 type: ['Ice', 'Water'],4013 hp: 110,4014 attack: 80,4015 defense: 90,4016 special_attack: 95,4017 special_defense: 90,4018 speed: 65,4019 },4020 {4021 id: 366,4022 name: 'Clamperl',4023 type: ['Water'],4024 hp: 35,4025 attack: 64,4026 defense: 85,4027 special_attack: 74,4028 special_defense: 55,4029 speed: 32,4030 },4031 {4032 id: 367,4033 name: 'Huntail',4034 type: ['Water'],4035 hp: 55,4036 attack: 104,4037 defense: 105,4038 special_attack: 94,4039 special_defense: 75,4040 speed: 52,4041 },4042 {4043 id: 368,4044 name: 'Gorebyss',4045 type: ['Water'],4046 hp: 55,4047 attack: 84,4048 defense: 105,4049 special_attack: 114,4050 special_defense: 75,4051 speed: 52,4052 },4053 {4054 id: 369,4055 name: 'Relicanth',4056 type: ['Water', 'Rock'],4057 hp: 100,4058 attack: 90,4059 defense: 130,4060 special_attack: 45,4061 special_defense: 65,4062 speed: 55,4063 },4064 {4065 id: 370,4066 name: 'Luvdisc',4067 type: ['Water'],4068 hp: 43,4069 attack: 30,4070 defense: 55,4071 special_attack: 40,4072 special_defense: 65,4073 speed: 97,4074 },4075 {4076 id: 371,4077 name: 'Bagon',4078 type: ['Dragon'],4079 hp: 45,4080 attack: 75,4081 defense: 60,4082 special_attack: 40,4083 special_defense: 30,4084 speed: 50,4085 },4086 {4087 id: 372,4088 name: 'Shelgon',4089 type: ['Dragon'],4090 hp: 65,4091 attack: 95,4092 defense: 100,4093 special_attack: 60,4094 special_defense: 50,4095 speed: 50,4096 },4097 {4098 id: 373,4099 name: 'Salamence',4100 type: ['Dragon', 'Flying'],4101 hp: 95,4102 attack: 135,4103 defense: 80,4104 special_attack: 110,4105 special_defense: 80,4106 speed: 100,4107 },4108 {4109 id: 374,4110 name: 'Beldum',4111 type: ['Steel', 'Psychic'],4112 hp: 40,4113 attack: 55,4114 defense: 80,4115 special_attack: 35,4116 special_defense: 60,4117 speed: 30,4118 },4119 {4120 id: 375,4121 name: 'Metang',4122 type: ['Steel', 'Psychic'],4123 hp: 60,4124 attack: 75,4125 defense: 100,4126 special_attack: 55,4127 special_defense: 80,4128 speed: 50,4129 },4130 {4131 id: 376,4132 name: 'Metagross',4133 type: ['Steel', 'Psychic'],4134 hp: 80,4135 attack: 135,4136 defense: 130,4137 special_attack: 95,4138 special_defense: 90,4139 speed: 70,4140 },4141 {4142 id: 377,4143 name: 'Regirock',4144 type: ['Rock'],4145 hp: 80,4146 attack: 100,4147 defense: 200,4148 special_attack: 50,4149 special_defense: 100,4150 speed: 50,4151 },4152 {4153 id: 378,4154 name: 'Regice',4155 type: ['Ice'],4156 hp: 80,4157 attack: 50,4158 defense: 100,4159 special_attack: 100,4160 special_defense: 200,4161 speed: 50,4162 },4163 {4164 id: 379,4165 name: 'Registeel',4166 type: ['Steel'],4167 hp: 80,4168 attack: 75,4169 defense: 150,4170 special_attack: 75,4171 special_defense: 150,4172 speed: 50,4173 },4174 {4175 id: 380,4176 name: 'Latias',4177 type: ['Dragon', 'Psychic'],4178 hp: 80,4179 attack: 80,4180 defense: 90,4181 special_attack: 110,4182 special_defense: 130,4183 speed: 110,4184 },4185 {4186 id: 381,4187 name: 'Latios',4188 type: ['Dragon', 'Psychic'],4189 hp: 80,4190 attack: 90,4191 defense: 80,4192 special_attack: 130,4193 special_defense: 110,4194 speed: 110,4195 },4196 {4197 id: 382,4198 name: 'Kyogre',4199 type: ['Water'],4200 hp: 100,4201 attack: 100,4202 defense: 90,4203 special_attack: 150,4204 special_defense: 140,4205 speed: 90,4206 },4207 {4208 id: 383,4209 name: 'Groudon',4210 type: ['Ground'],4211 hp: 100,4212 attack: 150,4213 defense: 140,4214 special_attack: 100,4215 special_defense: 90,4216 speed: 90,4217 },4218 {4219 id: 384,4220 name: 'Rayquaza',4221 type: ['Dragon', 'Flying'],4222 hp: 105,4223 attack: 150,4224 defense: 90,4225 special_attack: 150,4226 special_defense: 90,4227 speed: 95,4228 },4229 {4230 id: 385,4231 name: 'Jirachi',4232 type: ['Steel', 'Psychic'],4233 hp: 100,4234 attack: 100,4235 defense: 100,4236 special_attack: 100,4237 special_defense: 100,4238 speed: 100,4239 },4240 {4241 id: 386,4242 name: 'Deoxys',4243 type: ['Psychic'],4244 hp: 50,4245 attack: 150,4246 defense: 50,4247 special_attack: 150,4248 special_defense: 50,4249 speed: 150,4250 },4251 {4252 id: 387,4253 name: 'Turtwig',4254 type: ['Grass'],4255 hp: 55,4256 attack: 68,4257 defense: 64,4258 special_attack: 45,4259 special_defense: 55,4260 speed: 31,4261 },4262 {4263 id: 388,4264 name: 'Grotle',4265 type: ['Grass'],4266 hp: 75,4267 attack: 89,4268 defense: 85,4269 special_attack: 55,4270 special_defense: 65,4271 speed: 36,4272 },4273 {4274 id: 389,4275 name: 'Torterra',4276 type: ['Grass', 'Ground'],4277 hp: 95,4278 attack: 109,4279 defense: 105,4280 special_attack: 75,4281 special_defense: 85,4282 speed: 56,4283 },4284 {4285 id: 390,4286 name: 'Chimchar',4287 type: ['Fire'],4288 hp: 44,4289 attack: 58,4290 defense: 44,4291 special_attack: 58,4292 special_defense: 44,4293 speed: 61,4294 },4295 {4296 id: 391,4297 name: 'Monferno',4298 type: ['Fire', 'Fighting'],4299 hp: 64,4300 attack: 78,4301 defense: 52,4302 special_attack: 78,4303 special_defense: 52,4304 speed: 81,4305 },4306 {4307 id: 392,4308 name: 'Infernape',4309 type: ['Fire', 'Fighting'],4310 hp: 76,4311 attack: 104,4312 defense: 71,4313 special_attack: 104,4314 special_defense: 71,4315 speed: 108,4316 },4317 {4318 id: 393,4319 name: 'Piplup',4320 type: ['Water'],4321 hp: 53,4322 attack: 51,4323 defense: 53,4324 special_attack: 61,4325 special_defense: 56,4326 speed: 40,4327 },4328 {4329 id: 394,4330 name: 'Prinplup',4331 type: ['Water'],4332 hp: 64,4333 attack: 66,4334 defense: 68,4335 special_attack: 81,4336 special_defense: 76,4337 speed: 50,4338 },4339 {4340 id: 395,4341 name: 'Empoleon',4342 type: ['Water', 'Steel'],4343 hp: 84,4344 attack: 86,4345 defense: 88,4346 special_attack: 111,4347 special_defense: 101,4348 speed: 60,4349 },4350 {4351 id: 396,4352 name: 'Starly',4353 type: ['Normal', 'Flying'],4354 hp: 40,4355 attack: 55,4356 defense: 30,4357 special_attack: 30,4358 special_defense: 30,4359 speed: 60,4360 },4361 {4362 id: 397,4363 name: 'Staravia',4364 type: ['Normal', 'Flying'],4365 hp: 55,4366 attack: 75,4367 defense: 50,4368 special_attack: 40,4369 special_defense: 40,4370 speed: 80,4371 },4372 {4373 id: 398,4374 name: 'Staraptor',4375 type: ['Normal', 'Flying'],4376 hp: 85,4377 attack: 120,4378 defense: 70,4379 special_attack: 50,4380 special_defense: 60,4381 speed: 100,4382 },4383 {4384 id: 399,4385 name: 'Bidoof',4386 type: ['Normal'],4387 hp: 59,4388 attack: 45,4389 defense: 40,4390 special_attack: 35,4391 special_defense: 40,4392 speed: 31,4393 },4394 {4395 id: 400,4396 name: 'Bibarel',4397 type: ['Normal', 'Water'],4398 hp: 79,4399 attack: 85,4400 defense: 60,4401 special_attack: 55,4402 special_defense: 60,4403 speed: 71,4404 },4405 {4406 id: 401,4407 name: 'Kricketot',4408 type: ['Bug'],4409 hp: 37,4410 attack: 25,4411 defense: 41,4412 special_attack: 25,4413 special_defense: 41,4414 speed: 25,4415 },4416 {4417 id: 402,4418 name: 'Kricketune',4419 type: ['Bug'],4420 hp: 77,4421 attack: 85,4422 defense: 51,4423 special_attack: 55,4424 special_defense: 51,4425 speed: 65,4426 },4427 {4428 id: 403,4429 name: 'Shinx',4430 type: ['Electric'],4431 hp: 45,4432 attack: 65,4433 defense: 34,4434 special_attack: 40,4435 special_defense: 34,4436 speed: 45,4437 },4438 {4439 id: 404,4440 name: 'Luxio',4441 type: ['Electric'],4442 hp: 60,4443 attack: 85,4444 defense: 49,4445 special_attack: 60,4446 special_defense: 49,4447 speed: 60,4448 },4449 {4450 id: 405,4451 name: 'Luxray',4452 type: ['Electric'],4453 hp: 80,4454 attack: 120,4455 defense: 79,4456 special_attack: 95,4457 special_defense: 79,4458 speed: 70,4459 },4460 {4461 id: 406,4462 name: 'Budew',4463 type: ['Grass', 'Poison'],4464 hp: 40,4465 attack: 30,4466 defense: 35,4467 special_attack: 50,4468 special_defense: 70,4469 speed: 55,4470 },4471 {4472 id: 407,4473 name: 'Roserade',4474 type: ['Grass', 'Poison'],4475 hp: 60,4476 attack: 70,4477 defense: 65,4478 special_attack: 125,4479 special_defense: 105,4480 speed: 90,4481 },4482 {4483 id: 408,4484 name: 'Cranidos',4485 type: ['Rock'],4486 hp: 67,4487 attack: 125,4488 defense: 40,4489 special_attack: 30,4490 special_defense: 30,4491 speed: 58,4492 },4493 {4494 id: 409,4495 name: 'Rampardos',4496 type: ['Rock'],4497 hp: 97,4498 attack: 165,4499 defense: 60,4500 special_attack: 65,4501 special_defense: 50,4502 speed: 58,4503 },4504 {4505 id: 410,4506 name: 'Shieldon',4507 type: ['Rock', 'Steel'],4508 hp: 30,4509 attack: 42,4510 defense: 118,4511 special_attack: 42,4512 special_defense: 88,4513 speed: 30,4514 },4515 {4516 id: 411,4517 name: 'Bastiodon',4518 type: ['Rock', 'Steel'],4519 hp: 60,4520 attack: 52,4521 defense: 168,4522 special_attack: 47,4523 special_defense: 138,4524 speed: 30,4525 },4526 {4527 id: 412,4528 name: 'Burmy',4529 type: ['Bug'],4530 hp: 40,4531 attack: 29,4532 defense: 45,4533 special_attack: 29,4534 special_defense: 45,4535 speed: 36,4536 },4537 {4538 id: 413,4539 name: 'Wormadam',4540 type: ['Bug', 'Grass'],4541 hp: 60,4542 attack: 59,4543 defense: 85,4544 special_attack: 79,4545 special_defense: 105,4546 speed: 36,4547 },4548 {4549 id: 414,4550 name: 'Mothim',4551 type: ['Bug', 'Flying'],4552 hp: 70,4553 attack: 94,4554 defense: 50,4555 special_attack: 94,4556 special_defense: 50,4557 speed: 66,4558 },4559 {4560 id: 415,4561 name: 'Combee',4562 type: ['Bug', 'Flying'],4563 hp: 30,4564 attack: 30,4565 defense: 42,4566 special_attack: 30,4567 special_defense: 42,4568 speed: 70,4569 },4570 {4571 id: 416,4572 name: 'Vespiquen',4573 type: ['Bug', 'Flying'],4574 hp: 70,4575 attack: 80,4576 defense: 102,4577 special_attack: 80,4578 special_defense: 102,4579 speed: 40,4580 },4581 {4582 id: 417,4583 name: 'Pachirisu',4584 type: ['Electric'],4585 hp: 60,4586 attack: 45,4587 defense: 70,4588 special_attack: 45,4589 special_defense: 90,4590 speed: 95,4591 },4592 {4593 id: 418,4594 name: 'Buizel',4595 type: ['Water'],4596 hp: 55,4597 attack: 65,4598 defense: 35,4599 special_attack: 60,4600 special_defense: 30,4601 speed: 85,4602 },4603 {4604 id: 419,4605 name: 'Floatzel',4606 type: ['Water'],4607 hp: 85,4608 attack: 105,4609 defense: 55,4610 special_attack: 85,4611 special_defense: 50,4612 speed: 115,4613 },4614 {4615 id: 420,4616 name: 'Cherubi',4617 type: ['Grass'],4618 hp: 45,4619 attack: 35,4620 defense: 45,4621 special_attack: 62,4622 special_defense: 53,4623 speed: 35,4624 },4625 {4626 id: 421,4627 name: 'Cherrim',4628 type: ['Grass'],4629 hp: 70,4630 attack: 60,4631 defense: 70,4632 special_attack: 87,4633 special_defense: 78,4634 speed: 85,4635 },4636 {4637 id: 422,4638 name: 'Shellos',4639 type: ['Water'],4640 hp: 76,4641 attack: 48,4642 defense: 48,4643 special_attack: 57,4644 special_defense: 62,4645 speed: 34,4646 },4647 {4648 id: 423,4649 name: 'Gastrodon',4650 type: ['Water', 'Ground'],4651 hp: 111,4652 attack: 83,4653 defense: 68,4654 special_attack: 92,4655 special_defense: 82,4656 speed: 39,4657 },4658 {4659 id: 424,4660 name: 'Ambipom',4661 type: ['Normal'],4662 hp: 75,4663 attack: 100,4664 defense: 66,4665 special_attack: 60,4666 special_defense: 66,4667 speed: 115,4668 },4669 {4670 id: 425,4671 name: 'Drifloon',4672 type: ['Ghost', 'Flying'],4673 hp: 90,4674 attack: 50,4675 defense: 34,4676 special_attack: 60,4677 special_defense: 44,4678 speed: 70,4679 },4680 {4681 id: 426,4682 name: 'Drifblim',4683 type: ['Ghost', 'Flying'],4684 hp: 150,4685 attack: 80,4686 defense: 44,4687 special_attack: 90,4688 special_defense: 54,4689 speed: 80,4690 },4691 {4692 id: 427,4693 name: 'Buneary',4694 type: ['Normal'],4695 hp: 55,4696 attack: 66,4697 defense: 44,4698 special_attack: 44,4699 special_defense: 56,4700 speed: 85,4701 },4702 {4703 id: 428,4704 name: 'Lopunny',4705 type: ['Normal'],4706 hp: 65,4707 attack: 76,4708 defense: 84,4709 special_attack: 54,4710 special_defense: 96,4711 speed: 105,4712 },4713 {4714 id: 429,4715 name: 'Mismagius',4716 type: ['Ghost'],4717 hp: 60,4718 attack: 60,4719 defense: 60,4720 special_attack: 105,4721 special_defense: 105,4722 speed: 105,4723 },4724 {4725 id: 430,4726 name: 'Honchkrow',4727 type: ['Dark', 'Flying'],4728 hp: 100,4729 attack: 125,4730 defense: 52,4731 special_attack: 105,4732 special_defense: 52,4733 speed: 71,4734 },4735 {4736 id: 431,4737 name: 'Glameow',4738 type: ['Normal'],4739 hp: 49,4740 attack: 55,4741 defense: 42,4742 special_attack: 42,4743 special_defense: 37,4744 speed: 85,4745 },4746 {4747 id: 432,4748 name: 'Purugly',4749 type: ['Normal'],4750 hp: 71,4751 attack: 82,4752 defense: 64,4753 special_attack: 64,4754 special_defense: 59,4755 speed: 112,4756 },4757 {4758 id: 433,4759 name: 'Chingling',4760 type: ['Psychic'],4761 hp: 45,4762 attack: 30,4763 defense: 50,4764 special_attack: 65,4765 special_defense: 50,4766 speed: 45,4767 },4768 {4769 id: 434,4770 name: 'Stunky',4771 type: ['Poison', 'Dark'],4772 hp: 63,4773 attack: 63,4774 defense: 47,4775 special_attack: 41,4776 special_defense: 41,4777 speed: 74,4778 },4779 {4780 id: 435,4781 name: 'Skuntank',4782 type: ['Poison', 'Dark'],4783 hp: 103,4784 attack: 93,4785 defense: 67,4786 special_attack: 71,4787 special_defense: 61,4788 speed: 84,4789 },4790 {4791 id: 436,4792 name: 'Bronzor',4793 type: ['Steel', 'Psychic'],4794 hp: 57,4795 attack: 24,4796 defense: 86,4797 special_attack: 24,4798 special_defense: 86,4799 speed: 23,4800 },4801 {4802 id: 437,4803 name: 'Bronzong',4804 type: ['Steel', 'Psychic'],4805 hp: 67,4806 attack: 89,4807 defense: 116,4808 special_attack: 79,4809 special_defense: 116,4810 speed: 33,4811 },4812 {4813 id: 438,4814 name: 'Bonsly',4815 type: ['Rock'],4816 hp: 50,4817 attack: 80,4818 defense: 95,4819 special_attack: 10,4820 special_defense: 45,4821 speed: 10,4822 },4823 {4824 id: 439,4825 name: 'Mime Jr.',4826 type: ['Psychic', 'Fairy'],4827 hp: 20,4828 attack: 25,4829 defense: 45,4830 special_attack: 70,4831 special_defense: 90,4832 speed: 60,4833 },4834 {4835 id: 440,4836 name: 'Happiny',4837 type: ['Normal'],4838 hp: 100,4839 attack: 5,4840 defense: 5,4841 special_attack: 15,4842 special_defense: 65,4843 speed: 30,4844 },4845 {4846 id: 441,4847 name: 'Chatot',4848 type: ['Normal', 'Flying'],4849 hp: 76,4850 attack: 65,4851 defense: 45,4852 special_attack: 92,4853 special_defense: 42,4854 speed: 91,4855 },4856 {4857 id: 442,4858 name: 'Spiritomb',4859 type: ['Ghost', 'Dark'],4860 hp: 50,4861 attack: 92,4862 defense: 108,4863 special_attack: 92,4864 special_defense: 108,4865 speed: 35,4866 },4867 {4868 id: 443,4869 name: 'Gible',4870 type: ['Dragon', 'Ground'],4871 hp: 58,4872 attack: 70,4873 defense: 45,4874 special_attack: 40,4875 special_defense: 45,4876 speed: 42,4877 },4878 {4879 id: 444,4880 name: 'Gabite',4881 type: ['Dragon', 'Ground'],4882 hp: 68,4883 attack: 90,4884 defense: 65,4885 special_attack: 50,4886 special_defense: 55,4887 speed: 82,4888 },4889 {4890 id: 445,4891 name: 'Garchomp',4892 type: ['Dragon', 'Ground'],4893 hp: 108,4894 attack: 130,4895 defense: 95,4896 special_attack: 80,4897 special_defense: 85,4898 speed: 102,4899 },4900 {4901 id: 446,4902 name: 'Munchlax',4903 type: ['Normal'],4904 hp: 135,4905 attack: 85,4906 defense: 40,4907 special_attack: 40,4908 special_defense: 85,4909 speed: 5,4910 },4911 {4912 id: 447,4913 name: 'Riolu',4914 type: ['Fighting'],4915 hp: 40,4916 attack: 70,4917 defense: 40,4918 special_attack: 35,4919 special_defense: 40,4920 speed: 60,4921 },4922 {4923 id: 448,4924 name: 'Lucario',4925 type: ['Fighting', 'Steel'],4926 hp: 70,4927 attack: 110,4928 defense: 70,4929 special_attack: 115,4930 special_defense: 70,4931 speed: 90,4932 },4933 {4934 id: 449,4935 name: 'Hippopotas',4936 type: ['Ground'],4937 hp: 68,4938 attack: 72,4939 defense: 78,4940 special_attack: 38,4941 special_defense: 42,4942 speed: 32,4943 },4944 {4945 id: 450,4946 name: 'Hippowdon',4947 type: ['Ground'],4948 hp: 108,4949 attack: 112,4950 defense: 118,4951 special_attack: 68,4952 special_defense: 72,4953 speed: 47,4954 },4955 {4956 id: 451,4957 name: 'Skorupi',4958 type: ['Poison', 'Bug'],4959 hp: 40,4960 attack: 50,4961 defense: 90,4962 special_attack: 30,4963 special_defense: 55,4964 speed: 65,4965 },4966 {4967 id: 452,4968 name: 'Drapion',4969 type: ['Poison', 'Dark'],4970 hp: 70,4971 attack: 90,4972 defense: 110,4973 special_attack: 60,4974 special_defense: 75,4975 speed: 95,4976 },4977 {4978 id: 453,4979 name: 'Croagunk',4980 type: ['Poison', 'Fighting'],4981 hp: 48,4982 attack: 61,4983 defense: 40,4984 special_attack: 61,4985 special_defense: 40,4986 speed: 50,4987 },4988 {4989 id: 454,4990 name: 'Toxicroak',4991 type: ['Poison', 'Fighting'],4992 hp: 83,4993 attack: 106,4994 defense: 65,4995 special_attack: 86,4996 special_defense: 65,4997 speed: 85,4998 },4999 {5000 id: 455,5001 name: 'Carnivine',5002 type: ['Grass'],5003 hp: 74,5004 attack: 100,5005 defense: 72,5006 special_attack: 90,5007 special_defense: 72,5008 speed: 46,5009 },5010 {5011 id: 456,5012 name: 'Finneon',5013 type: ['Water'],5014 hp: 49,5015 attack: 49,5016 defense: 56,5017 special_attack: 49,5018 special_defense: 61,5019 speed: 66,5020 },5021 {5022 id: 457,5023 name: 'Lumineon',5024 type: ['Water'],5025 hp: 69,5026 attack: 69,5027 defense: 76,5028 special_attack: 69,5029 special_defense: 86,5030 speed: 91,5031 },5032 {5033 id: 458,5034 name: 'Mantyke',5035 type: ['Water', 'Flying'],5036 hp: 45,5037 attack: 20,5038 defense: 50,5039 special_attack: 60,5040 special_defense: 120,5041 speed: 50,5042 },5043 {5044 id: 459,5045 name: 'Snover',5046 type: ['Grass', 'Ice'],5047 hp: 60,5048 attack: 62,5049 defense: 50,5050 special_attack: 62,5051 special_defense: 60,5052 speed: 40,5053 },5054 {5055 id: 460,5056 name: 'Abomasnow',5057 type: ['Grass', 'Ice'],5058 hp: 90,5059 attack: 92,5060 defense: 75,5061 special_attack: 92,5062 special_defense: 85,5063 speed: 60,5064 },5065 {5066 id: 461,5067 name: 'Weavile',5068 type: ['Dark', 'Ice'],5069 hp: 70,5070 attack: 120,5071 defense: 65,5072 special_attack: 45,5073 special_defense: 85,5074 speed: 125,5075 },5076 {5077 id: 462,5078 name: 'Magnezone',5079 type: ['Electric', 'Steel'],5080 hp: 70,5081 attack: 70,5082 defense: 115,5083 special_attack: 130,5084 special_defense: 90,5085 speed: 60,5086 },5087 {5088 id: 463,5089 name: 'Lickilicky',5090 type: ['Normal'],5091 hp: 110,5092 attack: 85,5093 defense: 95,5094 special_attack: 80,5095 special_defense: 95,5096 speed: 50,5097 },5098 {5099 id: 464,5100 name: 'Rhyperior',5101 type: ['Ground', 'Rock'],5102 hp: 115,5103 attack: 140,5104 defense: 130,5105 special_attack: 55,5106 special_defense: 55,5107 speed: 40,5108 },5109 {5110 id: 465,5111 name: 'Tangrowth',5112 type: ['Grass'],5113 hp: 100,5114 attack: 100,5115 defense: 125,5116 special_attack: 110,5117 special_defense: 50,5118 speed: 50,5119 },5120 {5121 id: 466,5122 name: 'Electivire',5123 type: ['Electric'],5124 hp: 75,5125 attack: 123,5126 defense: 67,5127 special_attack: 95,5128 special_defense: 85,5129 speed: 95,5130 },5131 {5132 id: 467,5133 name: 'Magmortar',5134 type: ['Fire'],5135 hp: 75,5136 attack: 95,5137 defense: 67,5138 special_attack: 125,5139 special_defense: 95,5140 speed: 83,5141 },5142 {5143 id: 468,5144 name: 'Togekiss',5145 type: ['Fairy', 'Flying'],5146 hp: 85,5147 attack: 50,5148 defense: 95,5149 special_attack: 120,5150 special_defense: 115,5151 speed: 80,5152 },5153 {5154 id: 469,5155 name: 'Yanmega',5156 type: ['Bug', 'Flying'],5157 hp: 86,5158 attack: 76,5159 defense: 86,5160 special_attack: 116,5161 special_defense: 56,5162 speed: 95,5163 },5164 {5165 id: 470,5166 name: 'Leafeon',5167 type: ['Grass'],5168 hp: 65,5169 attack: 110,5170 defense: 130,5171 special_attack: 60,5172 special_defense: 65,5173 speed: 95,5174 },5175 {5176 id: 471,5177 name: 'Glaceon',5178 type: ['Ice'],5179 hp: 65,5180 attack: 60,5181 defense: 110,5182 special_attack: 130,5183 special_defense: 95,5184 speed: 65,5185 },5186 {5187 id: 472,5188 name: 'Gliscor',5189 type: ['Ground', 'Flying'],5190 hp: 75,5191 attack: 95,5192 defense: 125,5193 special_attack: 45,5194 special_defense: 75,5195 speed: 95,5196 },5197 {5198 id: 473,5199 name: 'Mamoswine',5200 type: ['Ice', 'Ground'],5201 hp: 110,5202 attack: 130,5203 defense: 80,5204 special_attack: 70,5205 special_defense: 60,5206 speed: 80,5207 },5208 {5209 id: 474,5210 name: 'Porygon-Z',5211 type: ['Normal'],5212 hp: 85,5213 attack: 80,5214 defense: 70,5215 special_attack: 135,5216 special_defense: 75,5217 speed: 90,5218 },5219 {5220 id: 475,5221 name: 'Gallade',5222 type: ['Psychic', 'Fighting'],5223 hp: 68,5224 attack: 125,5225 defense: 65,5226 special_attack: 65,5227 special_defense: 115,5228 speed: 80,5229 },5230 {5231 id: 476,5232 name: 'Probopass',5233 type: ['Rock', 'Steel'],5234 hp: 60,5235 attack: 55,5236 defense: 145,5237 special_attack: 75,5238 special_defense: 150,5239 speed: 40,5240 },5241 {5242 id: 477,5243 name: 'Dusknoir',5244 type: ['Ghost'],5245 hp: 45,5246 attack: 100,5247 defense: 135,5248 special_attack: 65,5249 special_defense: 135,5250 speed: 45,5251 },5252 {5253 id: 478,5254 name: 'Froslass',5255 type: ['Ice', 'Ghost'],5256 hp: 70,5257 attack: 80,5258 defense: 70,5259 special_attack: 80,5260 special_defense: 70,5261 speed: 110,5262 },5263 {5264 id: 479,5265 name: 'Rotom',5266 type: ['Electric', 'Ghost'],5267 hp: 50,5268 attack: 50,5269 defense: 77,5270 special_attack: 95,5271 special_defense: 77,5272 speed: 91,5273 },5274 {5275 id: 480,5276 name: 'Uxie',5277 type: ['Psychic'],5278 hp: 75,5279 attack: 75,5280 defense: 130,5281 special_attack: 75,5282 special_defense: 130,5283 speed: 95,5284 },5285 {5286 id: 481,5287 name: 'Mesprit',5288 type: ['Psychic'],5289 hp: 80,5290 attack: 105,5291 defense: 105,5292 special_attack: 105,5293 special_defense: 105,5294 speed: 80,5295 },5296 {5297 id: 482,5298 name: 'Azelf',5299 type: ['Psychic'],5300 hp: 75,5301 attack: 125,5302 defense: 70,5303 special_attack: 125,5304 special_defense: 70,5305 speed: 115,5306 },5307 {5308 id: 483,5309 name: 'Dialga',5310 type: ['Steel', 'Dragon'],5311 hp: 100,5312 attack: 120,5313 defense: 120,5314 special_attack: 150,5315 special_defense: 100,5316 speed: 90,5317 },5318 {5319 id: 484,5320 name: 'Palkia',5321 type: ['Water', 'Dragon'],5322 hp: 90,5323 attack: 120,5324 defense: 100,5325 special_attack: 150,5326 special_defense: 120,5327 speed: 100,5328 },5329 {5330 id: 485,5331 name: 'Heatran',5332 type: ['Fire', 'Steel'],5333 hp: 91,5334 attack: 90,5335 defense: 106,5336 special_attack: 130,5337 special_defense: 106,5338 speed: 77,5339 },5340 {5341 id: 486,5342 name: 'Regigigas',5343 type: ['Normal'],5344 hp: 110,5345 attack: 160,5346 defense: 110,5347 special_attack: 80,5348 special_defense: 110,5349 speed: 100,5350 },5351 {5352 id: 487,5353 name: 'Giratina',5354 type: ['Ghost', 'Dragon'],5355 hp: 150,5356 attack: 100,5357 defense: 120,5358 special_attack: 100,5359 special_defense: 120,5360 speed: 90,5361 },5362 {5363 id: 488,5364 name: 'Cresselia',5365 type: ['Psychic'],5366 hp: 120,5367 attack: 70,5368 defense: 120,5369 special_attack: 75,5370 special_defense: 130,5371 speed: 85,5372 },5373 {5374 id: 489,5375 name: 'Phione',5376 type: ['Water'],5377 hp: 80,5378 attack: 80,5379 defense: 80,5380 special_attack: 80,5381 special_defense: 80,5382 speed: 80,5383 },5384 {5385 id: 490,5386 name: 'Manaphy',5387 type: ['Water'],5388 hp: 100,5389 attack: 100,5390 defense: 100,5391 special_attack: 100,5392 special_defense: 100,5393 speed: 100,5394 },5395 {5396 id: 491,5397 name: 'Darkrai',5398 type: ['Dark'],5399 hp: 70,5400 attack: 90,5401 defense: 90,5402 special_attack: 135,5403 special_defense: 90,5404 speed: 125,5405 },5406 {5407 id: 492,5408 name: 'Shaymin',5409 type: ['Grass'],5410 hp: 100,5411 attack: 100,5412 defense: 100,5413 special_attack: 100,5414 special_defense: 100,5415 speed: 100,5416 },5417 {5418 id: 493,5419 name: 'Arceus',5420 type: ['Normal'],5421 hp: 120,5422 attack: 120,5423 defense: 120,5424 special_attack: 120,5425 special_defense: 120,5426 speed: 120,5427 },5428 {5429 id: 494,5430 name: 'Victini',5431 type: ['Psychic', 'Fire'],5432 hp: 100,5433 attack: 100,5434 defense: 100,5435 special_attack: 100,5436 special_defense: 100,5437 speed: 100,5438 },5439 {5440 id: 495,5441 name: 'Snivy',5442 type: ['Grass'],5443 hp: 45,5444 attack: 45,5445 defense: 55,5446 special_attack: 45,5447 special_defense: 55,5448 speed: 63,5449 },5450 {5451 id: 496,5452 name: 'Servine',5453 type: ['Grass'],5454 hp: 60,5455 attack: 60,5456 defense: 75,5457 special_attack: 60,5458 special_defense: 75,5459 speed: 83,5460 },5461 {5462 id: 497,5463 name: 'Serperior',5464 type: ['Grass'],5465 hp: 75,5466 attack: 75,5467 defense: 95,5468 special_attack: 75,5469 special_defense: 95,5470 speed: 113,5471 },5472 {5473 id: 498,5474 name: 'Tepig',5475 type: ['Fire'],5476 hp: 65,5477 attack: 63,5478 defense: 45,5479 special_attack: 45,5480 special_defense: 45,5481 speed: 45,5482 },5483 {5484 id: 499,5485 name: 'Pignite',5486 type: ['Fire', 'Fighting'],5487 hp: 90,5488 attack: 93,5489 defense: 55,5490 special_attack: 70,5491 special_defense: 55,5492 speed: 55,5493 },5494 {5495 id: 500,5496 name: 'Emboar',5497 type: ['Fire', 'Fighting'],5498 hp: 110,5499 attack: 123,5500 defense: 65,5501 special_attack: 100,5502 special_defense: 65,5503 speed: 65,5504 },5505 {5506 id: 501,5507 name: 'Oshawott',5508 type: ['Water'],5509 hp: 55,5510 attack: 55,5511 defense: 45,5512 special_attack: 63,5513 special_defense: 45,5514 speed: 45,5515 },5516 {5517 id: 502,5518 name: 'Dewott',5519 type: ['Water'],5520 hp: 75,5521 attack: 75,5522 defense: 60,5523 special_attack: 83,5524 special_defense: 60,5525 speed: 60,5526 },5527 {5528 id: 503,5529 name: 'Samurott',5530 type: ['Water'],5531 hp: 95,5532 attack: 100,5533 defense: 85,5534 special_attack: 108,5535 special_defense: 70,5536 speed: 70,5537 },5538 {5539 id: 504,5540 name: 'Patrat',5541 type: ['Normal'],5542 hp: 45,5543 attack: 55,5544 defense: 39,5545 special_attack: 35,5546 special_defense: 39,5547 speed: 42,5548 },5549 {5550 id: 505,5551 name: 'Watchog',5552 type: ['Normal'],5553 hp: 60,5554 attack: 85,5555 defense: 69,5556 special_attack: 60,5557 special_defense: 69,5558 speed: 77,5559 },5560 {5561 id: 506,5562 name: 'Lillipup',5563 type: ['Normal'],5564 hp: 45,5565 attack: 60,5566 defense: 45,5567 special_attack: 25,5568 special_defense: 45,5569 speed: 55,5570 },5571 {5572 id: 507,5573 name: 'Herdier',5574 type: ['Normal'],5575 hp: 65,5576 attack: 80,5577 defense: 65,5578 special_attack: 35,5579 special_defense: 65,5580 speed: 60,5581 },5582 {5583 id: 508,5584 name: 'Stoutland',5585 type: ['Normal'],5586 hp: 85,5587 attack: 110,5588 defense: 90,5589 special_attack: 45,5590 special_defense: 90,5591 speed: 80,5592 },5593 {5594 id: 509,5595 name: 'Purrloin',5596 type: ['Dark'],5597 hp: 41,5598 attack: 50,5599 defense: 37,5600 special_attack: 50,5601 special_defense: 37,5602 speed: 66,5603 },5604 {5605 id: 510,5606 name: 'Liepard',5607 type: ['Dark'],5608 hp: 64,5609 attack: 88,5610 defense: 50,5611 special_attack: 88,5612 special_defense: 50,5613 speed: 106,5614 },5615 {5616 id: 511,5617 name: 'Pansage',5618 type: ['Grass'],5619 hp: 50,5620 attack: 53,5621 defense: 48,5622 special_attack: 53,5623 special_defense: 48,5624 speed: 64,5625 },5626 {5627 id: 512,5628 name: 'Simisage',5629 type: ['Grass'],5630 hp: 75,5631 attack: 98,5632 defense: 63,5633 special_attack: 98,5634 special_defense: 63,5635 speed: 101,5636 },5637 {5638 id: 513,5639 name: 'Pansear',5640 type: ['Fire'],5641 hp: 50,5642 attack: 53,5643 defense: 48,5644 special_attack: 53,5645 special_defense: 48,5646 speed: 64,5647 },5648 {5649 id: 514,5650 name: 'Simisear',5651 type: ['Fire'],5652 hp: 75,5653 attack: 98,5654 defense: 63,5655 special_attack: 98,5656 special_defense: 63,5657 speed: 101,5658 },5659 {5660 id: 515,5661 name: 'Panpour',5662 type: ['Water'],5663 hp: 50,5664 attack: 53,5665 defense: 48,5666 special_attack: 53,5667 special_defense: 48,5668 speed: 64,5669 },5670 {5671 id: 516,5672 name: 'Simipour',5673 type: ['Water'],5674 hp: 75,5675 attack: 98,5676 defense: 63,5677 special_attack: 98,5678 special_defense: 63,5679 speed: 101,5680 },5681 {5682 id: 517,5683 name: 'Munna',5684 type: ['Psychic'],5685 hp: 76,5686 attack: 25,5687 defense: 45,5688 special_attack: 67,5689 special_defense: 55,5690 speed: 24,5691 },5692 {5693 id: 518,5694 name: 'Musharna',5695 type: ['Psychic'],5696 hp: 116,5697 attack: 55,5698 defense: 85,5699 special_attack: 107,5700 special_defense: 95,5701 speed: 29,5702 },5703 {5704 id: 519,5705 name: 'Pidove',5706 type: ['Normal', 'Flying'],5707 hp: 50,5708 attack: 55,5709 defense: 50,5710 special_attack: 36,5711 special_defense: 30,5712 speed: 43,5713 },5714 {5715 id: 520,5716 name: 'Tranquill',5717 type: ['Normal', 'Flying'],5718 hp: 62,5719 attack: 77,5720 defense: 62,5721 special_attack: 50,5722 special_defense: 42,5723 speed: 65,5724 },5725 {5726 id: 521,5727 name: 'Unfezant',5728 type: ['Normal', 'Flying'],5729 hp: 80,5730 attack: 115,5731 defense: 80,5732 special_attack: 65,5733 special_defense: 55,5734 speed: 93,5735 },5736 {5737 id: 522,5738 name: 'Blitzle',5739 type: ['Electric'],5740 hp: 45,5741 attack: 60,5742 defense: 32,5743 special_attack: 50,5744 special_defense: 32,5745 speed: 76,5746 },5747 {5748 id: 523,5749 name: 'Zebstrika',5750 type: ['Electric'],5751 hp: 75,5752 attack: 100,5753 defense: 63,5754 special_attack: 80,5755 special_defense: 63,5756 speed: 116,5757 },5758 {5759 id: 524,5760 name: 'Roggenrola',5761 type: ['Rock'],5762 hp: 55,5763 attack: 75,5764 defense: 85,5765 special_attack: 25,5766 special_defense: 25,5767 speed: 15,5768 },5769 {5770 id: 525,5771 name: 'Boldore',5772 type: ['Rock'],5773 hp: 70,5774 attack: 105,5775 defense: 105,5776 special_attack: 50,5777 special_defense: 40,5778 speed: 20,5779 },5780 {5781 id: 526,5782 name: 'Gigalith',5783 type: ['Rock'],5784 hp: 85,5785 attack: 135,5786 defense: 130,5787 special_attack: 60,5788 special_defense: 80,5789 speed: 25,5790 },5791 {5792 id: 527,5793 name: 'Woobat',5794 type: ['Psychic', 'Flying'],5795 hp: 65,5796 attack: 45,5797 defense: 43,5798 special_attack: 55,5799 special_defense: 43,5800 speed: 72,5801 },5802 {5803 id: 528,5804 name: 'Swoobat',5805 type: ['Psychic', 'Flying'],5806 hp: 67,5807 attack: 57,5808 defense: 55,5809 special_attack: 77,5810 special_defense: 55,5811 speed: 114,5812 },5813 {5814 id: 529,5815 name: 'Drilbur',5816 type: ['Ground'],5817 hp: 60,5818 attack: 85,5819 defense: 40,5820 special_attack: 30,5821 special_defense: 45,5822 speed: 68,5823 },5824 {5825 id: 530,5826 name: 'Excadrill',5827 type: ['Ground', 'Steel'],5828 hp: 110,5829 attack: 135,5830 defense: 60,5831 special_attack: 50,5832 special_defense: 65,5833 speed: 88,5834 },5835 {5836 id: 531,5837 name: 'Audino',5838 type: ['Normal'],5839 hp: 103,5840 attack: 60,5841 defense: 86,5842 special_attack: 60,5843 special_defense: 86,5844 speed: 50,5845 },5846 {5847 id: 532,5848 name: 'Timburr',5849 type: ['Fighting'],5850 hp: 75,5851 attack: 80,5852 defense: 55,5853 special_attack: 25,5854 special_defense: 35,5855 speed: 35,5856 },5857 {5858 id: 533,5859 name: 'Gurdurr',5860 type: ['Fighting'],5861 hp: 85,5862 attack: 105,5863 defense: 85,5864 special_attack: 40,5865 special_defense: 50,5866 speed: 40,5867 },5868 {5869 id: 534,5870 name: 'Conkeldurr',5871 type: ['Fighting'],5872 hp: 105,5873 attack: 140,5874 defense: 95,5875 special_attack: 55,5876 special_defense: 65,5877 speed: 45,5878 },5879 {5880 id: 535,5881 name: 'Tympole',5882 type: ['Water'],5883 hp: 50,5884 attack: 50,5885 defense: 40,5886 special_attack: 50,5887 special_defense: 40,5888 speed: 64,5889 },5890 {5891 id: 536,5892 name: 'Palpitoad',5893 type: ['Water', 'Ground'],5894 hp: 75,5895 attack: 65,5896 defense: 55,5897 special_attack: 65,5898 special_defense: 55,5899 speed: 69,5900 },5901 {5902 id: 537,5903 name: 'Seismitoad',5904 type: ['Water', 'Ground'],5905 hp: 105,5906 attack: 95,5907 defense: 75,5908 special_attack: 85,5909 special_defense: 75,5910 speed: 74,5911 },5912 {5913 id: 538,5914 name: 'Throh',5915 type: ['Fighting'],5916 hp: 120,5917 attack: 100,5918 defense: 85,5919 special_attack: 30,5920 special_defense: 85,5921 speed: 45,5922 },5923 {5924 id: 539,5925 name: 'Sawk',5926 type: ['Fighting'],5927 hp: 75,5928 attack: 125,5929 defense: 75,5930 special_attack: 30,5931 special_defense: 75,5932 speed: 85,5933 },5934 {5935 id: 540,5936 name: 'Sewaddle',5937 type: ['Bug', 'Grass'],5938 hp: 45,5939 attack: 53,5940 defense: 70,5941 special_attack: 40,5942 special_defense: 60,5943 speed: 42,5944 },5945 {5946 id: 541,5947 name: 'Swadloon',5948 type: ['Bug', 'Grass'],5949 hp: 55,5950 attack: 63,5951 defense: 90,5952 special_attack: 50,5953 special_defense: 80,5954 speed: 42,5955 },5956 {5957 id: 542,5958 name: 'Leavanny',5959 type: ['Bug', 'Grass'],5960 hp: 75,5961 attack: 103,5962 defense: 80,5963 special_attack: 70,5964 special_defense: 80,5965 speed: 92,5966 },5967 {5968 id: 543,5969 name: 'Venipede',5970 type: ['Bug', 'Poison'],5971 hp: 30,5972 attack: 45,5973 defense: 59,5974 special_attack: 30,5975 special_defense: 39,5976 speed: 57,5977 },5978 {5979 id: 544,5980 name: 'Whirlipede',5981 type: ['Bug', 'Poison'],5982 hp: 40,5983 attack: 55,5984 defense: 99,5985 special_attack: 40,5986 special_defense: 79,5987 speed: 47,5988 },5989 {5990 id: 545,5991 name: 'Scolipede',5992 type: ['Bug', 'Poison'],5993 hp: 60,5994 attack: 100,5995 defense: 89,5996 special_attack: 55,5997 special_defense: 69,5998 speed: 112,5999 },6000 {6001 id: 546,6002 name: 'Cottonee',6003 type: ['Grass', 'Fairy'],6004 hp: 40,6005 attack: 27,6006 defense: 60,6007 special_attack: 37,6008 special_defense: 50,6009 speed: 66,6010 },6011 {6012 id: 547,6013 name: 'Whimsicott',6014 type: ['Grass', 'Fairy'],6015 hp: 60,6016 attack: 67,6017 defense: 85,6018 special_attack: 77,6019 special_defense: 75,6020 speed: 116,6021 },6022 {6023 id: 548,6024 name: 'Petilil',6025 type: ['Grass'],6026 hp: 45,6027 attack: 35,6028 defense: 50,6029 special_attack: 70,6030 special_defense: 50,6031 speed: 30,6032 },6033 {6034 id: 549,6035 name: 'Lilligant',6036 type: ['Grass'],6037 hp: 70,6038 attack: 60,6039 defense: 75,6040 special_attack: 110,6041 special_defense: 75,6042 speed: 90,6043 },6044 {6045 id: 550,6046 name: 'Basculin',6047 type: ['Water'],6048 hp: 70,6049 attack: 92,6050 defense: 65,6051 special_attack: 80,6052 special_defense: 55,6053 speed: 98,6054 },6055 {6056 id: 551,6057 name: 'Sandile',6058 type: ['Ground', 'Dark'],6059 hp: 50,6060 attack: 72,6061 defense: 35,6062 special_attack: 35,6063 special_defense: 35,6064 speed: 65,6065 },6066 {6067 id: 552,6068 name: 'Krokorok',6069 type: ['Ground', 'Dark'],6070 hp: 60,6071 attack: 82,6072 defense: 45,6073 special_attack: 45,6074 special_defense: 45,6075 speed: 74,6076 },6077 {6078 id: 553,6079 name: 'Krookodile',6080 type: ['Ground', 'Dark'],6081 hp: 95,6082 attack: 117,6083 defense: 80,6084 special_attack: 65,6085 special_defense: 70,6086 speed: 92,6087 },6088 {6089 id: 554,6090 name: 'Darumaka',6091 type: ['Fire'],6092 hp: 70,6093 attack: 90,6094 defense: 45,6095 special_attack: 15,6096 special_defense: 45,6097 speed: 50,6098 },6099 {6100 id: 555,6101 name: 'Darmanitan',6102 type: ['Fire'],6103 hp: 105,6104 attack: 140,6105 defense: 55,6106 special_attack: 30,6107 special_defense: 55,6108 speed: 95,6109 },6110 {6111 id: 556,6112 name: 'Maractus',6113 type: ['Grass'],6114 hp: 75,6115 attack: 86,6116 defense: 67,6117 special_attack: 106,6118 special_defense: 67,6119 speed: 60,6120 },6121 {6122 id: 557,6123 name: 'Dwebble',6124 type: ['Bug', 'Rock'],6125 hp: 50,6126 attack: 65,6127 defense: 85,6128 special_attack: 35,6129 special_defense: 35,6130 speed: 55,6131 },6132 {6133 id: 558,6134 name: 'Crustle',6135 type: ['Bug', 'Rock'],6136 hp: 70,6137 attack: 105,6138 defense: 125,6139 special_attack: 65,6140 special_defense: 75,6141 speed: 45,6142 },6143 {6144 id: 559,6145 name: 'Scraggy',6146 type: ['Dark', 'Fighting'],6147 hp: 50,6148 attack: 75,6149 defense: 70,6150 special_attack: 35,6151 special_defense: 70,6152 speed: 48,6153 },6154 {6155 id: 560,6156 name: 'Scrafty',6157 type: ['Dark', 'Fighting'],6158 hp: 65,6159 attack: 90,6160 defense: 115,6161 special_attack: 45,6162 special_defense: 115,6163 speed: 58,6164 },6165 {6166 id: 561,6167 name: 'Sigilyph',6168 type: ['Psychic', 'Flying'],6169 hp: 72,6170 attack: 58,6171 defense: 80,6172 special_attack: 103,6173 special_defense: 80,6174 speed: 97,6175 },6176 {6177 id: 562,6178 name: 'Yamask',6179 type: ['Ghost'],6180 hp: 38,6181 attack: 30,6182 defense: 85,6183 special_attack: 55,6184 special_defense: 65,6185 speed: 30,6186 },6187 {6188 id: 563,6189 name: 'Cofagrigus',6190 type: ['Ghost'],6191 hp: 58,6192 attack: 50,6193 defense: 145,6194 special_attack: 95,6195 special_defense: 105,6196 speed: 30,6197 },6198 {6199 id: 564,6200 name: 'Tirtouga',6201 type: ['Water', 'Rock'],6202 hp: 54,6203 attack: 78,6204 defense: 103,6205 special_attack: 53,6206 special_defense: 45,6207 speed: 22,6208 },6209 {6210 id: 565,6211 name: 'Carracosta',6212 type: ['Water', 'Rock'],6213 hp: 74,6214 attack: 108,6215 defense: 133,6216 special_attack: 83,6217 special_defense: 65,6218 speed: 32,6219 },6220 {6221 id: 566,6222 name: 'Archen',6223 type: ['Rock', 'Flying'],6224 hp: 55,6225 attack: 112,6226 defense: 45,6227 special_attack: 74,6228 special_defense: 45,6229 speed: 70,6230 },6231 {6232 id: 567,6233 name: 'Archeops',6234 type: ['Rock', 'Flying'],6235 hp: 75,6236 attack: 140,6237 defense: 65,6238 special_attack: 112,6239 special_defense: 65,6240 speed: 110,6241 },6242 {6243 id: 568,6244 name: 'Trubbish',6245 type: ['Poison'],6246 hp: 50,6247 attack: 50,6248 defense: 62,6249 special_attack: 40,6250 special_defense: 62,6251 speed: 65,6252 },6253 {6254 id: 569,6255 name: 'Garbodor',6256 type: ['Poison'],6257 hp: 80,6258 attack: 95,6259 defense: 82,6260 special_attack: 60,6261 special_defense: 82,6262 speed: 75,6263 },6264 {6265 id: 570,6266 name: 'Zorua',6267 type: ['Dark'],6268 hp: 40,6269 attack: 65,6270 defense: 40,6271 special_attack: 80,6272 special_defense: 40,6273 speed: 65,6274 },6275 {6276 id: 571,6277 name: 'Zoroark',6278 type: ['Dark'],6279 hp: 60,6280 attack: 105,6281 defense: 60,6282 special_attack: 120,6283 special_defense: 60,6284 speed: 105,6285 },6286 {6287 id: 572,6288 name: 'Minccino',6289 type: ['Normal'],6290 hp: 55,6291 attack: 50,6292 defense: 40,6293 special_attack: 40,6294 special_defense: 40,6295 speed: 75,6296 },6297 {6298 id: 573,6299 name: 'Cinccino',6300 type: ['Normal'],6301 hp: 75,6302 attack: 95,6303 defense: 60,6304 special_attack: 65,6305 special_defense: 60,6306 speed: 115,6307 },6308 {6309 id: 574,6310 name: 'Gothita',6311 type: ['Psychic'],6312 hp: 45,6313 attack: 30,6314 defense: 50,6315 special_attack: 55,6316 special_defense: 65,6317 speed: 45,6318 },6319 {6320 id: 575,6321 name: 'Gothorita',6322 type: ['Psychic'],6323 hp: 60,6324 attack: 45,6325 defense: 70,6326 special_attack: 75,6327 special_defense: 85,6328 speed: 55,6329 },6330 {6331 id: 576,6332 name: 'Gothitelle',6333 type: ['Psychic'],6334 hp: 70,6335 attack: 55,6336 defense: 95,6337 special_attack: 95,6338 special_defense: 110,6339 speed: 65,6340 },6341 {6342 id: 577,6343 name: 'Solosis',6344 type: ['Psychic'],6345 hp: 45,6346 attack: 30,6347 defense: 40,6348 special_attack: 105,6349 special_defense: 50,6350 speed: 20,6351 },6352 {6353 id: 578,6354 name: 'Duosion',6355 type: ['Psychic'],6356 hp: 65,6357 attack: 40,6358 defense: 50,6359 special_attack: 125,6360 special_defense: 60,6361 speed: 30,6362 },6363 {6364 id: 579,6365 name: 'Reuniclus',6366 type: ['Psychic'],6367 hp: 110,6368 attack: 65,6369 defense: 75,6370 special_attack: 125,6371 special_defense: 85,6372 speed: 30,6373 },6374 {6375 id: 580,6376 name: 'Ducklett',6377 type: ['Water', 'Flying'],6378 hp: 62,6379 attack: 44,6380 defense: 50,6381 special_attack: 44,6382 special_defense: 50,6383 speed: 55,6384 },6385 {6386 id: 581,6387 name: 'Swanna',6388 type: ['Water', 'Flying'],6389 hp: 75,6390 attack: 87,6391 defense: 63,6392 special_attack: 87,6393 special_defense: 63,6394 speed: 98,6395 },6396 {6397 id: 582,6398 name: 'Vanillite',6399 type: ['Ice'],6400 hp: 36,6401 attack: 50,6402 defense: 50,6403 special_attack: 65,6404 special_defense: 60,6405 speed: 44,6406 },6407 {6408 id: 583,6409 name: 'Vanillish',6410 type: ['Ice'],6411 hp: 51,6412 attack: 65,6413 defense: 65,6414 special_attack: 80,6415 special_defense: 75,6416 speed: 59,6417 },6418 {6419 id: 584,6420 name: 'Vanilluxe',6421 type: ['Ice'],6422 hp: 71,6423 attack: 95,6424 defense: 85,6425 special_attack: 110,6426 special_defense: 95,6427 speed: 79,6428 },6429 {6430 id: 585,6431 name: 'Deerling',6432 type: ['Normal', 'Grass'],6433 hp: 60,6434 attack: 60,6435 defense: 50,6436 special_attack: 40,6437 special_defense: 50,6438 speed: 75,6439 },6440 {6441 id: 586,6442 name: 'Sawsbuck',6443 type: ['Normal', 'Grass'],6444 hp: 80,6445 attack: 100,6446 defense: 70,6447 special_attack: 60,6448 special_defense: 70,6449 speed: 95,6450 },6451 {6452 id: 587,6453 name: 'Emolga',6454 type: ['Electric', 'Flying'],6455 hp: 55,6456 attack: 75,6457 defense: 60,6458 special_attack: 75,6459 special_defense: 60,6460 speed: 103,6461 },6462 {6463 id: 588,6464 name: 'Karrablast',6465 type: ['Bug'],6466 hp: 50,6467 attack: 75,6468 defense: 45,6469 special_attack: 40,6470 special_defense: 45,6471 speed: 60,6472 },6473 {6474 id: 589,6475 name: 'Escavalier',6476 type: ['Bug', 'Steel'],6477 hp: 70,6478 attack: 135,6479 defense: 105,6480 special_attack: 60,6481 special_defense: 105,6482 speed: 20,6483 },6484 {6485 id: 590,6486 name: 'Foongus',6487 type: ['Grass', 'Poison'],6488 hp: 69,6489 attack: 55,6490 defense: 45,6491 special_attack: 55,6492 special_defense: 55,6493 speed: 15,6494 },6495 {6496 id: 591,6497 name: 'Amoonguss',6498 type: ['Grass', 'Poison'],6499 hp: 114,6500 attack: 85,6501 defense: 70,6502 special_attack: 85,6503 special_defense: 80,6504 speed: 30,6505 },6506 {6507 id: 592,6508 name: 'Frillish',6509 type: ['Water', 'Ghost'],6510 hp: 55,6511 attack: 40,6512 defense: 50,6513 special_attack: 65,6514 special_defense: 85,6515 speed: 40,6516 },6517 {6518 id: 593,6519 name: 'Jellicent',6520 type: ['Water', 'Ghost'],6521 hp: 100,6522 attack: 60,6523 defense: 70,6524 special_attack: 85,6525 special_defense: 105,6526 speed: 60,6527 },6528 {6529 id: 594,6530 name: 'Alomomola',6531 type: ['Water'],6532 hp: 165,6533 attack: 75,6534 defense: 80,6535 special_attack: 40,6536 special_defense: 45,6537 speed: 65,6538 },6539 {6540 id: 595,6541 name: 'Joltik',6542 type: ['Bug', 'Electric'],6543 hp: 50,6544 attack: 47,6545 defense: 50,6546 special_attack: 57,6547 special_defense: 50,6548 speed: 65,6549 },6550 {6551 id: 596,6552 name: 'Galvantula',6553 type: ['Bug', 'Electric'],6554 hp: 70,6555 attack: 77,6556 defense: 60,6557 special_attack: 97,6558 special_defense: 60,6559 speed: 108,6560 },6561 {6562 id: 597,6563 name: 'Ferroseed',6564 type: ['Grass', 'Steel'],6565 hp: 44,6566 attack: 50,6567 defense: 91,6568 special_attack: 24,6569 special_defense: 86,6570 speed: 10,6571 },6572 {6573 id: 598,6574 name: 'Ferrothorn',6575 type: ['Grass', 'Steel'],6576 hp: 74,6577 attack: 94,6578 defense: 131,6579 special_attack: 54,6580 special_defense: 116,6581 speed: 20,6582 },6583 {6584 id: 599,6585 name: 'Klink',6586 type: ['Steel'],6587 hp: 40,6588 attack: 55,6589 defense: 70,6590 special_attack: 45,6591 special_defense: 60,6592 speed: 30,6593 },6594 {6595 id: 600,6596 name: 'Klang',6597 type: ['Steel'],6598 hp: 60,6599 attack: 80,6600 defense: 95,6601 special_attack: 70,6602 special_defense: 85,6603 speed: 50,6604 },6605 {6606 id: 601,6607 name: 'Klinklang',6608 type: ['Steel'],6609 hp: 60,6610 attack: 100,6611 defense: 115,6612 special_attack: 70,6613 special_defense: 85,6614 speed: 90,6615 },6616 {6617 id: 602,6618 name: 'Tynamo',6619 type: ['Electric'],6620 hp: 35,6621 attack: 55,6622 defense: 40,6623 special_attack: 45,6624 special_defense: 40,6625 speed: 60,6626 },6627 {6628 id: 603,6629 name: 'Eelektrik',6630 type: ['Electric'],6631 hp: 65,6632 attack: 85,6633 defense: 70,6634 special_attack: 75,6635 special_defense: 70,6636 speed: 40,6637 },6638 {6639 id: 604,6640 name: 'Eelektross',6641 type: ['Electric'],6642 hp: 85,6643 attack: 115,6644 defense: 80,6645 special_attack: 105,6646 special_defense: 80,6647 speed: 50,6648 },6649 {6650 id: 605,6651 name: 'Elgyem',6652 type: ['Psychic'],6653 hp: 55,6654 attack: 55,6655 defense: 55,6656 special_attack: 85,6657 special_defense: 55,6658 speed: 30,6659 },6660 {6661 id: 606,6662 name: 'Beheeyem',6663 type: ['Psychic'],6664 hp: 75,6665 attack: 75,6666 defense: 75,6667 special_attack: 125,6668 special_defense: 95,6669 speed: 40,6670 },6671 {6672 id: 607,6673 name: 'Litwick',6674 type: ['Ghost', 'Fire'],6675 hp: 50,6676 attack: 30,6677 defense: 55,6678 special_attack: 65,6679 special_defense: 55,6680 speed: 20,6681 },6682 {6683 id: 608,6684 name: 'Lampent',6685 type: ['Ghost', 'Fire'],6686 hp: 60,6687 attack: 40,6688 defense: 60,6689 special_attack: 95,6690 special_defense: 60,6691 speed: 55,6692 },6693 {6694 id: 609,6695 name: 'Chandelure',6696 type: ['Ghost', 'Fire'],6697 hp: 60,6698 attack: 55,6699 defense: 90,6700 special_attack: 145,6701 special_defense: 90,6702 speed: 80,6703 },6704 {6705 id: 610,6706 name: 'Axew',6707 type: ['Dragon'],6708 hp: 46,6709 attack: 87,6710 defense: 60,6711 special_attack: 30,6712 special_defense: 40,6713 speed: 57,6714 },6715 {6716 id: 611,6717 name: 'Fraxure',6718 type: ['Dragon'],6719 hp: 66,6720 attack: 117,6721 defense: 70,6722 special_attack: 40,6723 special_defense: 50,6724 speed: 67,6725 },6726 {6727 id: 612,6728 name: 'Haxorus',6729 type: ['Dragon'],6730 hp: 76,6731 attack: 147,6732 defense: 90,6733 special_attack: 60,6734 special_defense: 70,6735 speed: 97,6736 },6737 {6738 id: 613,6739 name: 'Cubchoo',6740 type: ['Ice'],6741 hp: 55,6742 attack: 70,6743 defense: 40,6744 special_attack: 60,6745 special_defense: 40,6746 speed: 40,6747 },6748 {6749 id: 614,6750 name: 'Beartic',6751 type: ['Ice'],6752 hp: 95,6753 attack: 130,6754 defense: 80,6755 special_attack: 70,6756 special_defense: 80,6757 speed: 50,6758 },6759 {6760 id: 615,6761 name: 'Cryogonal',6762 type: ['Ice'],6763 hp: 80,6764 attack: 50,6765 defense: 50,6766 special_attack: 95,6767 special_defense: 135,6768 speed: 105,6769 },6770 {6771 id: 616,6772 name: 'Shelmet',6773 type: ['Bug'],6774 hp: 50,6775 attack: 40,6776 defense: 85,6777 special_attack: 40,6778 special_defense: 65,6779 speed: 25,6780 },6781 {6782 id: 617,6783 name: 'Accelgor',6784 type: ['Bug'],6785 hp: 80,6786 attack: 70,6787 defense: 40,6788 special_attack: 100,6789 special_defense: 60,6790 speed: 145,6791 },6792 {6793 id: 618,6794 name: 'Stunfisk',6795 type: ['Ground', 'Electric'],6796 hp: 109,6797 attack: 66,6798 defense: 84,6799 special_attack: 81,6800 special_defense: 99,6801 speed: 32,6802 },6803 {6804 id: 619,6805 name: 'Mienfoo',6806 type: ['Fighting'],6807 hp: 45,6808 attack: 85,6809 defense: 50,6810 special_attack: 55,6811 special_defense: 50,6812 speed: 65,6813 },6814 {6815 id: 620,6816 name: 'Mienshao',6817 type: ['Fighting'],6818 hp: 65,6819 attack: 125,6820 defense: 60,6821 special_attack: 95,6822 special_defense: 60,6823 speed: 105,6824 },6825 {6826 id: 621,6827 name: 'Druddigon',6828 type: ['Dragon'],6829 hp: 77,6830 attack: 120,6831 defense: 90,6832 special_attack: 60,6833 special_defense: 90,6834 speed: 48,6835 },6836 {6837 id: 622,6838 name: 'Golett',6839 type: ['Ground', 'Ghost'],6840 hp: 59,6841 attack: 74,6842 defense: 50,6843 special_attack: 35,6844 special_defense: 50,6845 speed: 35,6846 },6847 {6848 id: 623,6849 name: 'Golurk',6850 type: ['Ground', 'Ghost'],6851 hp: 89,6852 attack: 124,6853 defense: 80,6854 special_attack: 55,6855 special_defense: 80,6856 speed: 55,6857 },6858 {6859 id: 624,6860 name: 'Pawniard',6861 type: ['Dark', 'Steel'],6862 hp: 45,6863 attack: 85,6864 defense: 70,6865 special_attack: 40,6866 special_defense: 40,6867 speed: 60,6868 },6869 {6870 id: 625,6871 name: 'Bisharp',6872 type: ['Dark', 'Steel'],6873 hp: 65,6874 attack: 125,6875 defense: 100,6876 special_attack: 60,6877 special_defense: 70,6878 speed: 70,6879 },6880 {6881 id: 626,6882 name: 'Bouffalant',6883 type: ['Normal'],6884 hp: 95,6885 attack: 110,6886 defense: 95,6887 special_attack: 40,6888 special_defense: 95,6889 speed: 55,6890 },6891 {6892 id: 627,6893 name: 'Rufflet',6894 type: ['Normal', 'Flying'],6895 hp: 70,6896 attack: 83,6897 defense: 50,6898 special_attack: 37,6899 special_defense: 50,6900 speed: 60,6901 },6902 {6903 id: 628,6904 name: 'Braviary',6905 type: ['Normal', 'Flying'],6906 hp: 100,6907 attack: 123,6908 defense: 75,6909 special_attack: 57,6910 special_defense: 75,6911 speed: 80,6912 },6913 {6914 id: 629,6915 name: 'Vullaby',6916 type: ['Dark', 'Flying'],6917 hp: 70,6918 attack: 55,6919 defense: 75,6920 special_attack: 45,6921 special_defense: 65,6922 speed: 60,6923 },6924 {6925 id: 630,6926 name: 'Mandibuzz',6927 type: ['Dark', 'Flying'],6928 hp: 110,6929 attack: 65,6930 defense: 105,6931 special_attack: 55,6932 special_defense: 95,6933 speed: 80,6934 },6935 {6936 id: 631,6937 name: 'Heatmor',6938 type: ['Fire'],6939 hp: 85,6940 attack: 97,6941 defense: 66,6942 special_attack: 105,6943 special_defense: 66,6944 speed: 65,6945 },6946 {6947 id: 632,6948 name: 'Durant',6949 type: ['Bug', 'Steel'],6950 hp: 58,6951 attack: 109,6952 defense: 112,6953 special_attack: 48,6954 special_defense: 48,6955 speed: 109,6956 },6957 {6958 id: 633,6959 name: 'Deino',6960 type: ['Dark', 'Dragon'],6961 hp: 52,6962 attack: 65,6963 defense: 50,6964 special_attack: 45,6965 special_defense: 50,6966 speed: 38,6967 },6968 {6969 id: 634,6970 name: 'Zweilous',6971 type: ['Dark', 'Dragon'],6972 hp: 72,6973 attack: 85,6974 defense: 70,6975 special_attack: 65,6976 special_defense: 70,6977 speed: 58,6978 },6979 {6980 id: 635,6981 name: 'Hydreigon',6982 type: ['Dark', 'Dragon'],6983 hp: 92,6984 attack: 105,6985 defense: 90,6986 special_attack: 125,6987 special_defense: 90,6988 speed: 98,6989 },6990 {6991 id: 636,6992 name: 'Larvesta',6993 type: ['Bug', 'Fire'],6994 hp: 55,6995 attack: 85,6996 defense: 55,6997 special_attack: 50,6998 special_defense: 55,6999 speed: 60,7000 },7001 {7002 id: 637,7003 name: 'Volcarona',7004 type: ['Bug', 'Fire'],7005 hp: 85,7006 attack: 60,7007 defense: 65,7008 special_attack: 135,7009 special_defense: 105,7010 speed: 100,7011 },7012 {7013 id: 638,7014 name: 'Cobalion',7015 type: ['Steel', 'Fighting'],7016 hp: 91,7017 attack: 90,7018 defense: 129,7019 special_attack: 90,7020 special_defense: 72,7021 speed: 108,7022 },7023 {7024 id: 639,7025 name: 'Terrakion',7026 type: ['Rock', 'Fighting'],7027 hp: 91,7028 attack: 129,7029 defense: 90,7030 special_attack: 72,7031 special_defense: 90,7032 speed: 108,7033 },7034 {7035 id: 640,7036 name: 'Virizion',7037 type: ['Grass', 'Fighting'],7038 hp: 91,7039 attack: 90,7040 defense: 72,7041 special_attack: 90,7042 special_defense: 129,7043 speed: 108,7044 },7045 {7046 id: 641,7047 name: 'Tornadus',7048 type: ['Flying'],7049 hp: 79,7050 attack: 115,7051 defense: 70,7052 special_attack: 125,7053 special_defense: 80,7054 speed: 111,7055 },7056 {7057 id: 642,7058 name: 'Thundurus',7059 type: ['Electric', 'Flying'],7060 hp: 79,7061 attack: 115,7062 defense: 70,7063 special_attack: 125,7064 special_defense: 80,7065 speed: 111,7066 },7067 {7068 id: 643,7069 name: 'Reshiram',7070 type: ['Dragon', 'Fire'],7071 hp: 100,7072 attack: 120,7073 defense: 100,7074 special_attack: 150,7075 special_defense: 120,7076 speed: 90,7077 },7078 {7079 id: 644,7080 name: 'Zekrom',7081 type: ['Dragon', 'Electric'],7082 hp: 100,7083 attack: 150,7084 defense: 120,7085 special_attack: 120,7086 special_defense: 100,7087 speed: 90,7088 },7089 {7090 id: 645,7091 name: 'Landorus',7092 type: ['Ground', 'Flying'],7093 hp: 89,7094 attack: 125,7095 defense: 90,7096 special_attack: 115,7097 special_defense: 80,7098 speed: 101,7099 },7100 {7101 id: 646,7102 name: 'Kyurem',7103 type: ['Dragon', 'Ice'],7104 hp: 125,7105 attack: 130,7106 defense: 90,7107 special_attack: 130,7108 special_defense: 90,7109 speed: 95,7110 },7111 {7112 id: 647,7113 name: 'Keldeo',7114 type: ['Water', 'Fighting'],7115 hp: 91,7116 attack: 72,7117 defense: 90,7118 special_attack: 129,7119 special_defense: 90,7120 speed: 108,7121 },7122 {7123 id: 648,7124 name: 'Meloetta',7125 type: ['Normal', 'Psychic'],7126 hp: 100,7127 attack: 77,7128 defense: 77,7129 special_attack: 128,7130 special_defense: 128,7131 speed: 90,7132 },7133 {7134 id: 649,7135 name: 'Genesect',7136 type: ['Bug', 'Steel'],7137 hp: 71,7138 attack: 120,7139 defense: 95,7140 special_attack: 120,7141 special_defense: 95,7142 speed: 99,7143 },7144 {7145 id: 650,7146 name: 'Chespin',7147 type: ['Grass'],7148 hp: 56,7149 attack: 61,7150 defense: 65,7151 special_attack: 48,7152 special_defense: 45,7153 speed: 38,7154 },7155 {7156 id: 651,7157 name: 'Quilladin',7158 type: ['Grass'],7159 hp: 61,7160 attack: 78,7161 defense: 95,7162 special_attack: 56,7163 special_defense: 58,7164 speed: 57,7165 },7166 {7167 id: 652,7168 name: 'Chesnaught',7169 type: ['Grass', 'Fighting'],7170 hp: 88,7171 attack: 107,7172 defense: 122,7173 special_attack: 74,7174 special_defense: 75,7175 speed: 64,7176 },7177 {7178 id: 653,7179 name: 'Fennekin',7180 type: ['Fire'],7181 hp: 40,7182 attack: 45,7183 defense: 40,7184 special_attack: 62,7185 special_defense: 60,7186 speed: 60,7187 },7188 {7189 id: 654,7190 name: 'Braixen',7191 type: ['Fire'],7192 hp: 59,7193 attack: 59,7194 defense: 58,7195 special_attack: 90,7196 special_defense: 70,7197 speed: 73,7198 },7199 {7200 id: 655,7201 name: 'Delphox',7202 type: ['Fire', 'Psychic'],7203 hp: 75,7204 attack: 69,7205 defense: 72,7206 special_attack: 114,7207 special_defense: 100,7208 speed: 104,7209 },7210 {7211 id: 656,7212 name: 'Froakie',7213 type: ['Water'],7214 hp: 41,7215 attack: 56,7216 defense: 40,7217 special_attack: 62,7218 special_defense: 44,7219 speed: 71,7220 },7221 {7222 id: 657,7223 name: 'Frogadier',7224 type: ['Water'],7225 hp: 54,7226 attack: 63,7227 defense: 52,7228 special_attack: 83,7229 special_defense: 56,7230 speed: 97,7231 },7232 {7233 id: 658,7234 name: 'Greninja',7235 type: ['Water', 'Dark'],7236 hp: 72,7237 attack: 95,7238 defense: 67,7239 special_attack: 103,7240 special_defense: 71,7241 speed: 122,7242 },7243 {7244 id: 659,7245 name: 'Bunnelby',7246 type: ['Normal'],7247 hp: 38,7248 attack: 36,7249 defense: 38,7250 special_attack: 32,7251 special_defense: 36,7252 speed: 57,7253 },7254 {7255 id: 660,7256 name: 'Diggersby',7257 type: ['Normal', 'Ground'],7258 hp: 85,7259 attack: 56,7260 defense: 77,7261 special_attack: 50,7262 special_defense: 77,7263 speed: 78,7264 },7265 {7266 id: 661,7267 name: 'Fletchling',7268 type: ['Normal', 'Flying'],7269 hp: 45,7270 attack: 50,7271 defense: 43,7272 special_attack: 40,7273 special_defense: 38,7274 speed: 62,7275 },7276 {7277 id: 662,7278 name: 'Fletchinder',7279 type: ['Fire', 'Flying'],7280 hp: 62,7281 attack: 73,7282 defense: 55,7283 special_attack: 56,7284 special_defense: 52,7285 speed: 84,7286 },7287 {7288 id: 663,7289 name: 'Talonflame',7290 type: ['Fire', 'Flying'],7291 hp: 78,7292 attack: 81,7293 defense: 71,7294 special_attack: 74,7295 special_defense: 69,7296 speed: 126,7297 },7298 {7299 id: 664,7300 name: 'Scatterbug',7301 type: ['Bug'],7302 hp: 38,7303 attack: 35,7304 defense: 40,7305 special_attack: 27,7306 special_defense: 25,7307 speed: 35,7308 },7309 {7310 id: 665,7311 name: 'Spewpa',7312 type: ['Bug'],7313 hp: 45,7314 attack: 22,7315 defense: 60,7316 special_attack: 27,7317 special_defense: 30,7318 speed: 29,7319 },7320 {7321 id: 666,7322 name: 'Vivillon',7323 type: ['Bug', 'Flying'],7324 hp: 80,7325 attack: 52,7326 defense: 50,7327 special_attack: 90,7328 special_defense: 50,7329 speed: 89,7330 },7331 {7332 id: 667,7333 name: 'Litleo',7334 type: ['Fire', 'Normal'],7335 hp: 62,7336 attack: 50,7337 defense: 58,7338 special_attack: 73,7339 special_defense: 54,7340 speed: 72,7341 },7342 {7343 id: 668,7344 name: 'Pyroar',7345 type: ['Fire', 'Normal'],7346 hp: 86,7347 attack: 68,7348 defense: 72,7349 special_attack: 109,7350 special_defense: 66,7351 speed: 106,7352 },7353 {7354 id: 669,7355 name: 'Flabébé',7356 type: ['Fairy'],7357 hp: 44,7358 attack: 38,7359 defense: 39,7360 special_attack: 61,7361 special_defense: 79,7362 speed: 42,7363 },7364 {7365 id: 670,7366 name: 'Floette',7367 type: ['Fairy'],7368 hp: 54,7369 attack: 45,7370 defense: 47,7371 special_attack: 75,7372 special_defense: 98,7373 speed: 52,7374 },7375 {7376 id: 671,7377 name: 'Florges',7378 type: ['Fairy'],7379 hp: 78,7380 attack: 65,7381 defense: 68,7382 special_attack: 112,7383 special_defense: 154,7384 speed: 75,7385 },7386 {7387 id: 672,7388 name: 'Skiddo',7389 type: ['Grass'],7390 hp: 66,7391 attack: 65,7392 defense: 48,7393 special_attack: 62,7394 special_defense: 57,7395 speed: 52,7396 },7397 {7398 id: 673,7399 name: 'Gogoat',7400 type: ['Grass'],7401 hp: 123,7402 attack: 100,7403 defense: 62,7404 special_attack: 97,7405 special_defense: 81,7406 speed: 68,7407 },7408 {7409 id: 674,7410 name: 'Pancham',7411 type: ['Fighting'],7412 hp: 67,7413 attack: 82,7414 defense: 62,7415 special_attack: 46,7416 special_defense: 48,7417 speed: 43,7418 },7419 {7420 id: 675,7421 name: 'Pangoro',7422 type: ['Fighting', 'Dark'],7423 hp: 95,7424 attack: 124,7425 defense: 78,7426 special_attack: 69,7427 special_defense: 71,7428 speed: 58,7429 },7430 {7431 id: 676,7432 name: 'Furfrou',7433 type: ['Normal'],7434 hp: 75,7435 attack: 80,7436 defense: 60,7437 special_attack: 65,7438 special_defense: 90,7439 speed: 102,7440 },7441 {7442 id: 677,7443 name: 'Espurr',7444 type: ['Psychic'],7445 hp: 62,7446 attack: 48,7447 defense: 54,7448 special_attack: 63,7449 special_defense: 60,7450 speed: 68,7451 },7452 {7453 id: 678,7454 name: 'Meowstic',7455 type: ['Psychic'],7456 hp: 74,7457 attack: 48,7458 defense: 76,7459 special_attack: 83,7460 special_defense: 81,7461 speed: 104,7462 },7463 {7464 id: 679,7465 name: 'Honedge',7466 type: ['Steel', 'Ghost'],7467 hp: 45,7468 attack: 80,7469 defense: 100,7470 special_attack: 35,7471 special_defense: 37,7472 speed: 28,7473 },7474 {7475 id: 680,7476 name: 'Doublade',7477 type: ['Steel', 'Ghost'],7478 hp: 59,7479 attack: 110,7480 defense: 150,7481 special_attack: 45,7482 special_defense: 49,7483 speed: 35,7484 },7485 {7486 id: 681,7487 name: 'Aegislash',7488 type: ['Steel', 'Ghost'],7489 hp: 60,7490 attack: 50,7491 defense: 150,7492 special_attack: 50,7493 special_defense: 150,7494 speed: 60,7495 },7496 {7497 id: 682,7498 name: 'Spritzee',7499 type: ['Fairy'],7500 hp: 78,7501 attack: 52,7502 defense: 60,7503 special_attack: 63,7504 special_defense: 65,7505 speed: 23,7506 },7507 {7508 id: 683,7509 name: 'Aromatisse',7510 type: ['Fairy'],7511 hp: 101,7512 attack: 72,7513 defense: 72,7514 special_attack: 99,7515 special_defense: 89,7516 speed: 29,7517 },7518 {7519 id: 684,7520 name: 'Swirlix',7521 type: ['Fairy'],7522 hp: 62,7523 attack: 48,7524 defense: 66,7525 special_attack: 59,7526 special_defense: 57,7527 speed: 49,7528 },7529 {7530 id: 685,7531 name: 'Slurpuff',7532 type: ['Fairy'],7533 hp: 82,7534 attack: 80,7535 defense: 86,7536 special_attack: 85,7537 special_defense: 75,7538 speed: 72,7539 },7540 {7541 id: 686,7542 name: 'Inkay',7543 type: ['Dark', 'Psychic'],7544 hp: 53,7545 attack: 54,7546 defense: 53,7547 special_attack: 37,7548 special_defense: 46,7549 speed: 45,7550 },7551 {7552 id: 687,7553 name: 'Malamar',7554 type: ['Dark', 'Psychic'],7555 hp: 86,7556 attack: 92,7557 defense: 88,7558 special_attack: 68,7559 special_defense: 75,7560 speed: 73,7561 },7562 {7563 id: 688,7564 name: 'Binacle',7565 type: ['Rock', 'Water'],7566 hp: 42,7567 attack: 52,7568 defense: 67,7569 special_attack: 39,7570 special_defense: 56,7571 speed: 50,7572 },7573 {7574 id: 689,7575 name: 'Barbaracle',7576 type: ['Rock', 'Water'],7577 hp: 72,7578 attack: 105,7579 defense: 115,7580 special_attack: 54,7581 special_defense: 86,7582 speed: 68,7583 },7584 {7585 id: 690,7586 name: 'Skrelp',7587 type: ['Poison', 'Water'],7588 hp: 50,7589 attack: 60,7590 defense: 60,7591 special_attack: 60,7592 special_defense: 60,7593 speed: 30,7594 },7595 {7596 id: 691,7597 name: 'Dragalge',7598 type: ['Poison', 'Dragon'],7599 hp: 65,7600 attack: 75,7601 defense: 90,7602 special_attack: 97,7603 special_defense: 123,7604 speed: 44,7605 },7606 {7607 id: 692,7608 name: 'Clauncher',7609 type: ['Water'],7610 hp: 50,7611 attack: 53,7612 defense: 62,7613 special_attack: 58,7614 special_defense: 63,7615 speed: 44,7616 },7617 {7618 id: 693,7619 name: 'Clawitzer',7620 type: ['Water'],7621 hp: 71,7622 attack: 73,7623 defense: 88,7624 special_attack: 120,7625 special_defense: 89,7626 speed: 59,7627 },7628 {7629 id: 694,7630 name: 'Helioptile',7631 type: ['Electric', 'Normal'],7632 hp: 44,7633 attack: 38,7634 defense: 33,7635 special_attack: 61,7636 special_defense: 43,7637 speed: 70,7638 },7639 {7640 id: 695,7641 name: 'Heliolisk',7642 type: ['Electric', 'Normal'],7643 hp: 62,7644 attack: 55,7645 defense: 52,7646 special_attack: 109,7647 special_defense: 94,7648 speed: 109,7649 },7650 {7651 id: 696,7652 name: 'Tyrunt',7653 type: ['Rock', 'Dragon'],7654 hp: 58,7655 attack: 89,7656 defense: 77,7657 special_attack: 45,7658 special_defense: 45,7659 speed: 48,7660 },7661 {7662 id: 697,7663 name: 'Tyrantrum',7664 type: ['Rock', 'Dragon'],7665 hp: 82,7666 attack: 121,7667 defense: 119,7668 special_attack: 69,7669 special_defense: 59,7670 speed: 71,7671 },7672 {7673 id: 698,7674 name: 'Amaura',7675 type: ['Rock', 'Ice'],7676 hp: 77,7677 attack: 59,7678 defense: 50,7679 special_attack: 67,7680 special_defense: 63,7681 speed: 46,7682 },7683 {7684 id: 699,7685 name: 'Aurorus',7686 type: ['Rock', 'Ice'],7687 hp: 123,7688 attack: 77,7689 defense: 72,7690 special_attack: 99,7691 special_defense: 92,7692 speed: 58,7693 },7694 {7695 id: 700,7696 name: 'Sylveon',7697 type: ['Fairy'],7698 hp: 95,7699 attack: 65,7700 defense: 65,7701 special_attack: 110,7702 special_defense: 130,7703 speed: 60,7704 },7705 {7706 id: 701,7707 name: 'Hawlucha',7708 type: ['Fighting', 'Flying'],7709 hp: 78,7710 attack: 92,7711 defense: 75,7712 special_attack: 74,7713 special_defense: 63,7714 speed: 118,7715 },7716 {7717 id: 702,7718 name: 'Dedenne',7719 type: ['Electric', 'Fairy'],7720 hp: 67,7721 attack: 58,7722 defense: 57,7723 special_attack: 81,7724 special_defense: 67,7725 speed: 101,7726 },7727 {7728 id: 703,7729 name: 'Carbink',7730 type: ['Rock', 'Fairy'],7731 hp: 50,7732 attack: 50,7733 defense: 150,7734 special_attack: 50,7735 special_defense: 150,7736 speed: 50,7737 },7738 {7739 id: 704,7740 name: 'Goomy',7741 type: ['Dragon'],7742 hp: 45,7743 attack: 50,7744 defense: 35,7745 special_attack: 55,7746 special_defense: 75,7747 speed: 40,7748 },7749 {7750 id: 705,7751 name: 'Sliggoo',7752 type: ['Dragon'],7753 hp: 68,7754 attack: 75,7755 defense: 53,7756 special_attack: 83,7757 special_defense: 113,7758 speed: 60,7759 },7760 {7761 id: 706,7762 name: 'Goodra',7763 type: ['Dragon'],7764 hp: 90,7765 attack: 100,7766 defense: 70,7767 special_attack: 110,7768 special_defense: 150,7769 speed: 80,7770 },7771 {7772 id: 707,7773 name: 'Klefki',7774 type: ['Steel', 'Fairy'],7775 hp: 57,7776 attack: 80,7777 defense: 91,7778 special_attack: 80,7779 special_defense: 87,7780 speed: 75,7781 },7782 {7783 id: 708,7784 name: 'Phantump',7785 type: ['Ghost', 'Grass'],7786 hp: 43,7787 attack: 70,7788 defense: 48,7789 special_attack: 50,7790 special_defense: 60,7791 speed: 38,7792 },7793 {7794 id: 709,7795 name: 'Trevenant',7796 type: ['Ghost', 'Grass'],7797 hp: 85,7798 attack: 110,7799 defense: 76,7800 special_attack: 65,7801 special_defense: 82,7802 speed: 56,7803 },7804 {7805 id: 710,7806 name: 'Pumpkaboo',7807 type: ['Ghost', 'Grass'],7808 hp: 59,7809 attack: 66,7810 defense: 70,7811 special_attack: 44,7812 special_defense: 55,7813 speed: 41,7814 },7815 {7816 id: 711,7817 name: 'Gourgeist',7818 type: ['Ghost', 'Grass'],7819 hp: 85,7820 attack: 100,7821 defense: 122,7822 special_attack: 58,7823 special_defense: 75,7824 speed: 54,7825 },7826 {7827 id: 712,7828 name: 'Bergmite',7829 type: ['Ice'],7830 hp: 55,7831 attack: 69,7832 defense: 85,7833 special_attack: 32,7834 special_defense: 35,7835 speed: 28,7836 },7837 {7838 id: 713,7839 name: 'Avalugg',7840 type: ['Ice'],7841 hp: 95,7842 attack: 117,7843 defense: 184,7844 special_attack: 44,7845 special_defense: 46,7846 speed: 28,7847 },7848 {7849 id: 714,7850 name: 'Noibat',7851 type: ['Flying', 'Dragon'],7852 hp: 40,7853 attack: 30,7854 defense: 35,7855 special_attack: 45,7856 special_defense: 40,7857 speed: 55,7858 },7859 {7860 id: 715,7861 name: 'Noivern',7862 type: ['Flying', 'Dragon'],7863 hp: 85,7864 attack: 70,7865 defense: 80,7866 special_attack: 97,7867 special_defense: 80,7868 speed: 123,7869 },7870 {7871 id: 716,7872 name: 'Xerneas',7873 type: ['Fairy'],7874 hp: 126,7875 attack: 131,7876 defense: 95,7877 special_attack: 131,7878 special_defense: 98,7879 speed: 99,7880 },7881 {7882 id: 717,7883 name: 'Yveltal',7884 type: ['Dark', 'Flying'],7885 hp: 126,7886 attack: 131,7887 defense: 95,7888 special_attack: 131,7889 special_defense: 98,7890 speed: 99,7891 },7892 {7893 id: 718,7894 name: 'Zygarde',7895 type: ['Dragon', 'Ground'],7896 hp: 108,7897 attack: 100,7898 defense: 121,7899 special_attack: 81,7900 special_defense: 95,7901 speed: 95,7902 },7903 {7904 id: 719,7905 name: 'Diancie',7906 type: ['Rock', 'Fairy'],7907 hp: 50,7908 attack: 100,7909 defense: 150,7910 special_attack: 100,7911 special_defense: 150,7912 speed: 50,7913 },7914 {7915 id: 720,7916 name: 'Hoopa',7917 type: ['Psychic', 'Ghost'],7918 hp: 80,7919 attack: 110,7920 defense: 60,7921 special_attack: 150,7922 special_defense: 130,7923 speed: 70,7924 },7925 {7926 id: 721,7927 name: 'Volcanion',7928 type: ['Fire', 'Water'],7929 hp: 80,7930 attack: 110,7931 defense: 120,7932 special_attack: 130,7933 special_defense: 90,7934 speed: 70,7935 },7936 {7937 id: 722,7938 name: 'Rowlet',7939 type: ['Grass', 'Flying'],7940 hp: 68,7941 attack: 55,7942 defense: 55,7943 special_attack: 50,7944 special_defense: 50,7945 speed: 42,7946 },7947 {7948 id: 723,7949 name: 'Dartrix',7950 type: ['Grass', 'Flying'],7951 hp: 78,7952 attack: 75,7953 defense: 75,7954 special_attack: 70,7955 special_defense: 70,7956 speed: 52,7957 },7958 {7959 id: 724,7960 name: 'Decidueye',7961 type: ['Grass', 'Ghost'],7962 hp: 78,7963 attack: 107,7964 defense: 75,7965 special_attack: 100,7966 special_defense: 100,7967 speed: 70,7968 },7969 {7970 id: 725,7971 name: 'Litten',7972 type: ['Fire'],7973 hp: 45,7974 attack: 65,7975 defense: 40,7976 special_attack: 60,7977 special_defense: 40,7978 speed: 70,7979 },7980 {7981 id: 726,7982 name: 'Torracat',7983 type: ['Fire'],7984 hp: 65,7985 attack: 85,7986 defense: 50,7987 special_attack: 80,7988 special_defense: 50,7989 speed: 90,7990 },7991 {7992 id: 727,7993 name: 'Incineroar',7994 type: ['Fire', 'Dark'],7995 hp: 95,7996 attack: 115,7997 defense: 90,7998 special_attack: 80,7999 special_defense: 90,8000 speed: 60,8001 },8002 {8003 id: 728,8004 name: 'Popplio',8005 type: ['Water'],8006 hp: 50,8007 attack: 54,8008 defense: 54,8009 special_attack: 66,8010 special_defense: 56,8011 speed: 40,8012 },8013 {8014 id: 729,8015 name: 'Brionne',8016 type: ['Water'],8017 hp: 60,8018 attack: 69,8019 defense: 69,8020 special_attack: 91,8021 special_defense: 81,8022 speed: 50,8023 },8024 {8025 id: 730,8026 name: 'Primarina',8027 type: ['Water', 'Fairy'],8028 hp: 80,8029 attack: 74,8030 defense: 74,8031 special_attack: 126,8032 special_defense: 116,8033 speed: 60,8034 },8035 {8036 id: 731,8037 name: 'Pikipek',8038 type: ['Normal', 'Flying'],8039 hp: 35,8040 attack: 75,8041 defense: 30,8042 special_attack: 30,8043 special_defense: 30,8044 speed: 65,8045 },8046 {8047 id: 732,8048 name: 'Trumbeak',8049 type: ['Normal', 'Flying'],8050 hp: 55,8051 attack: 85,8052 defense: 50,8053 special_attack: 40,8054 special_defense: 50,8055 speed: 75,8056 },8057 {8058 id: 733,8059 name: 'Toucannon',8060 type: ['Normal', 'Flying'],8061 hp: 80,8062 attack: 120,8063 defense: 75,8064 special_attack: 75,8065 special_defense: 75,8066 speed: 60,8067 },8068 {8069 id: 734,8070 name: 'Yungoos',8071 type: ['Normal'],8072 hp: 48,8073 attack: 70,8074 defense: 30,8075 special_attack: 30,8076 special_defense: 30,8077 speed: 45,8078 },8079 {8080 id: 735,8081 name: 'Gumshoos',8082 type: ['Normal'],8083 hp: 88,8084 attack: 110,8085 defense: 60,8086 special_attack: 55,8087 special_defense: 60,8088 speed: 45,8089 },8090 {8091 id: 736,8092 name: 'Grubbin',8093 type: ['Bug'],8094 hp: 47,8095 attack: 62,8096 defense: 45,8097 special_attack: 55,8098 special_defense: 45,8099 speed: 46,8100 },8101 {8102 id: 737,8103 name: 'Charjabug',8104 type: ['Bug', 'Electric'],8105 hp: 57,8106 attack: 82,8107 defense: 95,8108 special_attack: 55,8109 special_defense: 75,8110 speed: 36,8111 },8112 {8113 id: 738,8114 name: 'Vikavolt',8115 type: ['Bug', 'Electric'],8116 hp: 77,8117 attack: 70,8118 defense: 90,8119 special_attack: 145,8120 special_defense: 75,8121 speed: 43,8122 },8123 {8124 id: 739,8125 name: 'Crabrawler',8126 type: ['Fighting'],8127 hp: 47,8128 attack: 82,8129 defense: 57,8130 special_attack: 42,8131 special_defense: 47,8132 speed: 63,8133 },8134 {8135 id: 740,8136 name: 'Crabominable',8137 type: ['Fighting', 'Ice'],8138 hp: 97,8139 attack: 132,8140 defense: 77,8141 special_attack: 62,8142 special_defense: 67,8143 speed: 43,8144 },8145 {8146 id: 741,8147 name: 'Oricorio',8148 type: ['Fire', 'Flying'],8149 hp: 75,8150 attack: 70,8151 defense: 70,8152 special_attack: 98,8153 special_defense: 70,8154 speed: 93,8155 },8156 {8157 id: 742,8158 name: 'Cutiefly',8159 type: ['Bug', 'Fairy'],8160 hp: 40,8161 attack: 45,8162 defense: 40,8163 special_attack: 55,8164 special_defense: 40,8165 speed: 84,8166 },8167 {8168 id: 743,8169 name: 'Ribombee',8170 type: ['Bug', 'Fairy'],8171 hp: 60,8172 attack: 55,8173 defense: 60,8174 special_attack: 95,8175 special_defense: 70,8176 speed: 124,8177 },8178 {8179 id: 744,8180 name: 'Rockruff',8181 type: ['Rock'],8182 hp: 45,8183 attack: 65,8184 defense: 40,8185 special_attack: 30,8186 special_defense: 40,8187 speed: 60,8188 },8189 {8190 id: 745,8191 name: 'Lycanroc',8192 type: ['Rock'],8193 hp: 75,8194 attack: 115,8195 defense: 65,8196 special_attack: 55,8197 special_defense: 65,8198 speed: 112,8199 },8200 {8201 id: 746,8202 name: 'Wishiwashi',8203 type: ['Water'],8204 hp: 45,8205 attack: 20,8206 defense: 20,8207 special_attack: 25,8208 special_defense: 25,8209 speed: 40,8210 },8211 {8212 id: 747,8213 name: 'Mareanie',8214 type: ['Poison', 'Water'],8215 hp: 50,8216 attack: 53,8217 defense: 62,8218 special_attack: 43,8219 special_defense: 52,8220 speed: 45,8221 },8222 {8223 id: 748,8224 name: 'Toxapex',8225 type: ['Poison', 'Water'],8226 hp: 50,8227 attack: 63,8228 defense: 152,8229 special_attack: 53,8230 special_defense: 142,8231 speed: 35,8232 },8233 {8234 id: 749,8235 name: 'Mudbray',8236 type: ['Ground'],8237 hp: 70,8238 attack: 100,8239 defense: 70,8240 special_attack: 45,8241 special_defense: 55,8242 speed: 45,8243 },8244 {8245 id: 750,8246 name: 'Mudsdale',8247 type: ['Ground'],8248 hp: 100,8249 attack: 125,8250 defense: 100,8251 special_attack: 55,8252 special_defense: 85,8253 speed: 35,8254 },8255 {8256 id: 751,8257 name: 'Dewpider',8258 type: ['Water', 'Bug'],8259 hp: 38,8260 attack: 40,8261 defense: 52,8262 special_attack: 40,8263 special_defense: 72,8264 speed: 27,8265 },8266 {8267 id: 752,8268 name: 'Araquanid',8269 type: ['Water', 'Bug'],8270 hp: 68,8271 attack: 70,8272 defense: 92,8273 special_attack: 50,8274 special_defense: 132,8275 speed: 42,8276 },8277 {8278 id: 753,8279 name: 'Fomantis',8280 type: ['Grass'],8281 hp: 40,8282 attack: 55,8283 defense: 35,8284 special_attack: 50,8285 special_defense: 35,8286 speed: 35,8287 },8288 {8289 id: 754,8290 name: 'Lurantis',8291 type: ['Grass'],8292 hp: 70,8293 attack: 105,8294 defense: 90,8295 special_attack: 80,8296 special_defense: 90,8297 speed: 45,8298 },8299 {8300 id: 755,8301 name: 'Morelull',8302 type: ['Grass', 'Fairy'],8303 hp: 40,8304 attack: 35,8305 defense: 55,8306 special_attack: 65,8307 special_defense: 75,8308 speed: 15,8309 },8310 {8311 id: 756,8312 name: 'Shiinotic',8313 type: ['Grass', 'Fairy'],8314 hp: 60,8315 attack: 45,8316 defense: 80,8317 special_attack: 90,8318 special_defense: 100,8319 speed: 30,8320 },8321 {8322 id: 757,8323 name: 'Salandit',8324 type: ['Poison', 'Fire'],8325 hp: 48,8326 attack: 44,8327 defense: 40,8328 special_attack: 71,8329 special_defense: 40,8330 speed: 77,8331 },8332 {8333 id: 758,8334 name: 'Salazzle',8335 type: ['Poison', 'Fire'],8336 hp: 68,8337 attack: 64,8338 defense: 60,8339 special_attack: 111,8340 special_defense: 60,8341 speed: 117,8342 },8343 {8344 id: 759,8345 name: 'Stufful',8346 type: ['Normal', 'Fighting'],8347 hp: 70,8348 attack: 75,8349 defense: 50,8350 special_attack: 45,8351 special_defense: 50,8352 speed: 50,8353 },8354 {8355 id: 760,8356 name: 'Bewear',8357 type: ['Normal', 'Fighting'],8358 hp: 120,8359 attack: 125,8360 defense: 80,8361 special_attack: 55,8362 special_defense: 60,8363 speed: 60,8364 },8365 {8366 id: 761,8367 name: 'Bounsweet',8368 type: ['Grass'],8369 hp: 42,8370 attack: 30,8371 defense: 38,8372 special_attack: 30,8373 special_defense: 38,8374 speed: 32,8375 },8376 {8377 id: 762,8378 name: 'Steenee',8379 type: ['Grass'],8380 hp: 52,8381 attack: 40,8382 defense: 48,8383 special_attack: 40,8384 special_defense: 48,8385 speed: 62,8386 },8387 {8388 id: 763,8389 name: 'Tsareena',8390 type: ['Grass'],8391 hp: 72,8392 attack: 120,8393 defense: 98,8394 special_attack: 50,8395 special_defense: 98,8396 speed: 72,8397 },8398 {8399 id: 764,8400 name: 'Comfey',8401 type: ['Fairy'],8402 hp: 51,8403 attack: 52,8404 defense: 90,8405 special_attack: 82,8406 special_defense: 110,8407 speed: 100,8408 },8409 {8410 id: 765,8411 name: 'Oranguru',8412 type: ['Normal', 'Psychic'],8413 hp: 90,8414 attack: 60,8415 defense: 80,8416 special_attack: 90,8417 special_defense: 110,8418 speed: 60,8419 },8420 {8421 id: 766,8422 name: 'Passimian',8423 type: ['Fighting'],8424 hp: 100,8425 attack: 120,8426 defense: 90,8427 special_attack: 40,8428 special_defense: 60,8429 speed: 80,8430 },8431 {8432 id: 767,8433 name: 'Wimpod',8434 type: ['Bug', 'Water'],8435 hp: 25,8436 attack: 35,8437 defense: 40,8438 special_attack: 20,8439 special_defense: 30,8440 speed: 80,8441 },8442 {8443 id: 768,8444 name: 'Golisopod',8445 type: ['Bug', 'Water'],8446 hp: 75,8447 attack: 125,8448 defense: 140,8449 special_attack: 60,8450 special_defense: 90,8451 speed: 40,8452 },8453 {8454 id: 769,8455 name: 'Sandygast',8456 type: ['Ghost', 'Ground'],8457 hp: 55,8458 attack: 55,8459 defense: 80,8460 special_attack: 70,8461 special_defense: 45,8462 speed: 15,8463 },8464 {8465 id: 770,8466 name: 'Palossand',8467 type: ['Ghost', 'Ground'],8468 hp: 85,8469 attack: 75,8470 defense: 110,8471 special_attack: 100,8472 special_defense: 75,8473 speed: 35,8474 },8475 {8476 id: 771,8477 name: 'Pyukumuku',8478 type: ['Water'],8479 hp: 55,8480 attack: 60,8481 defense: 130,8482 special_attack: 30,8483 special_defense: 130,8484 speed: 5,8485 },8486 {8487 id: 772,8488 name: 'Type: Null',8489 type: ['Normal'],8490 hp: 95,8491 attack: 95,8492 defense: 95,8493 special_attack: 95,8494 special_defense: 95,8495 speed: 59,8496 },8497 {8498 id: 773,8499 name: 'Silvally',8500 type: ['Normal'],8501 hp: 95,8502 attack: 95,8503 defense: 95,8504 special_attack: 95,8505 special_defense: 95,8506 speed: 95,8507 },8508 {8509 id: 774,8510 name: 'Minior',8511 type: ['Rock', 'Flying'],8512 hp: 60,8513 attack: 60,8514 defense: 100,8515 special_attack: 60,8516 special_defense: 100,8517 speed: 60,8518 },8519 {8520 id: 775,8521 name: 'Komala',8522 type: ['Normal'],8523 hp: 65,8524 attack: 115,8525 defense: 65,8526 special_attack: 75,8527 special_defense: 95,8528 speed: 65,8529 },8530 {8531 id: 776,8532 name: 'Turtonator',8533 type: ['Fire', 'Dragon'],8534 hp: 60,8535 attack: 78,8536 defense: 135,8537 special_attack: 91,8538 special_defense: 85,8539 speed: 36,8540 },8541 {8542 id: 777,8543 name: 'Togedemaru',8544 type: ['Electric', 'Steel'],8545 hp: 65,8546 attack: 98,8547 defense: 63,8548 special_attack: 40,8549 special_defense: 73,8550 speed: 96,8551 },8552 {8553 id: 778,8554 name: 'Mimikyu',8555 type: ['Ghost', 'Fairy'],8556 hp: 55,8557 attack: 90,8558 defense: 80,8559 special_attack: 50,8560 special_defense: 105,8561 speed: 96,8562 },8563 {8564 id: 779,8565 name: 'Bruxish',8566 type: ['Water', 'Psychic'],8567 hp: 68,8568 attack: 105,8569 defense: 70,8570 special_attack: 70,8571 special_defense: 70,8572 speed: 92,8573 },8574 {8575 id: 780,8576 name: 'Drampa',8577 type: ['Normal', 'Dragon'],8578 hp: 78,8579 attack: 60,8580 defense: 85,8581 special_attack: 135,8582 special_defense: 91,8583 speed: 36,8584 },8585 {8586 id: 781,8587 name: 'Dhelmise',8588 type: ['Ghost', 'Grass'],8589 hp: 70,8590 attack: 131,8591 defense: 100,8592 special_attack: 86,8593 special_defense: 90,8594 speed: 40,8595 },8596 {8597 id: 782,8598 name: 'Jangmo-o',8599 type: ['Dragon'],8600 hp: 45,8601 attack: 55,8602 defense: 65,8603 special_attack: 45,8604 special_defense: 45,8605 speed: 45,8606 },8607 {8608 id: 783,8609 name: 'Hakamo-o',8610 type: ['Dragon', 'Fighting'],8611 hp: 55,8612 attack: 75,8613 defense: 90,8614 special_attack: 65,8615 special_defense: 70,8616 speed: 65,8617 },8618 {8619 id: 784,8620 name: 'Kommo-o',8621 type: ['Dragon', 'Fighting'],8622 hp: 75,8623 attack: 110,8624 defense: 125,8625 special_attack: 100,8626 special_defense: 105,8627 speed: 85,8628 },8629 {8630 id: 785,8631 name: 'Tapu Koko',8632 type: ['Electric', 'Fairy'],8633 hp: 70,8634 attack: 115,8635 defense: 85,8636 special_attack: 95,8637 special_defense: 75,8638 speed: 130,8639 },8640 {8641 id: 786,8642 name: 'Tapu Lele',8643 type: ['Psychic', 'Fairy'],8644 hp: 70,8645 attack: 85,8646 defense: 75,8647 special_attack: 130,8648 special_defense: 115,8649 speed: 95,8650 },8651 {8652 id: 787,8653 name: 'Tapu Bulu',8654 type: ['Grass', 'Fairy'],8655 hp: 70,8656 attack: 130,8657 defense: 115,8658 special_attack: 85,8659 special_defense: 95,8660 speed: 75,8661 },8662 {8663 id: 788,8664 name: 'Tapu Fini',8665 type: ['Water', 'Fairy'],8666 hp: 70,8667 attack: 75,8668 defense: 115,8669 special_attack: 95,8670 special_defense: 130,8671 speed: 85,8672 },8673 {8674 id: 789,8675 name: 'Cosmog',8676 type: ['Psychic'],8677 hp: 43,8678 attack: 29,8679 defense: 31,8680 special_attack: 29,8681 special_defense: 31,8682 speed: 37,8683 },8684 {8685 id: 790,8686 name: 'Cosmoem',8687 type: ['Psychic'],8688 hp: 43,8689 attack: 29,8690 defense: 131,8691 special_attack: 29,8692 special_defense: 131,8693 speed: 37,8694 },8695 {8696 id: 791,8697 name: 'Solgaleo',8698 type: ['Psychic', 'Steel'],8699 hp: 137,8700 attack: 137,8701 defense: 107,8702 special_attack: 113,8703 special_defense: 89,8704 speed: 97,8705 },8706 {8707 id: 792,8708 name: 'Lunala',8709 type: ['Psychic', 'Ghost'],8710 hp: 137,8711 attack: 113,8712 defense: 89,8713 special_attack: 137,8714 special_defense: 107,8715 speed: 97,8716 },8717 {8718 id: 793,8719 name: 'Nihilego',8720 type: ['Rock', 'Poison'],8721 hp: 109,8722 attack: 53,8723 defense: 47,8724 special_attack: 127,8725 special_defense: 131,8726 speed: 103,8727 },8728 {8729 id: 794,8730 name: 'Buzzwole',8731 type: ['Bug', 'Fighting'],8732 hp: 107,8733 attack: 139,8734 defense: 139,8735 special_attack: 53,8736 special_defense: 53,8737 speed: 79,8738 },8739 {8740 id: 795,8741 name: 'Pheromosa',8742 type: ['Bug', 'Fighting'],8743 hp: 71,8744 attack: 137,8745 defense: 37,8746 special_attack: 137,8747 special_defense: 37,8748 speed: 151,8749 },8750 {8751 id: 796,8752 name: 'Xurkitree',8753 type: ['Electric'],8754 hp: 83,8755 attack: 89,8756 defense: 71,8757 special_attack: 173,8758 special_defense: 71,8759 speed: 83,8760 },8761 {8762 id: 797,8763 name: 'Celesteela',8764 type: ['Steel', 'Flying'],8765 hp: 97,8766 attack: 101,8767 defense: 103,8768 special_attack: 107,8769 special_defense: 101,8770 speed: 61,8771 },8772 {8773 id: 798,8774 name: 'Kartana',8775 type: ['Grass', 'Steel'],8776 hp: 59,8777 attack: 181,8778 defense: 131,8779 special_attack: 59,8780 special_defense: 31,8781 speed: 109,8782 },8783 {8784 id: 799,8785 name: 'Guzzlord',8786 type: ['Dark', 'Dragon'],8787 hp: 223,8788 attack: 101,8789 defense: 53,8790 special_attack: 97,8791 special_defense: 53,8792 speed: 43,8793 },8794 {8795 id: 800,8796 name: 'Necrozma',8797 type: ['Psychic'],8798 hp: 97,8799 attack: 107,8800 defense: 101,8801 special_attack: 127,8802 special_defense: 89,8803 speed: 79,8804 },8805 {8806 id: 801,8807 name: 'Magearna',8808 type: ['Steel', 'Fairy'],8809 hp: 80,8810 attack: 95,8811 defense: 115,8812 special_attack: 130,8813 special_defense: 115,8814 speed: 65,8815 },8816 {8817 id: 802,8818 name: 'Marshadow',8819 type: ['Fighting', 'Ghost'],8820 hp: 90,8821 attack: 125,8822 defense: 80,8823 special_attack: 90,8824 special_defense: 90,8825 speed: 125,8826 },8827 {8828 id: 803,8829 name: 'Poipole',8830 type: ['Poison'],8831 hp: 67,8832 attack: 73,8833 defense: 67,8834 special_attack: 73,8835 special_defense: 67,8836 speed: 73,8837 },8838 {8839 id: 804,8840 name: 'Naganadel',8841 type: ['Poison', 'Dragon'],8842 hp: 73,8843 attack: 73,8844 defense: 73,8845 special_attack: 127,8846 special_defense: 73,8847 speed: 121,8848 },8849 {8850 id: 805,8851 name: 'Stakataka',8852 type: ['Rock', 'Steel'],8853 hp: 61,8854 attack: 131,8855 defense: 211,8856 special_attack: 53,8857 special_defense: 101,8858 speed: 13,8859 },8860 {8861 id: 806,8862 name: 'Blacephalon',8863 type: ['Fire', 'Ghost'],8864 hp: 53,8865 attack: 127,8866 defense: 53,8867 special_attack: 151,8868 special_defense: 79,8869 speed: 107,8870 },8871 {8872 id: 807,8873 name: 'Zeraora',8874 type: ['Electric'],8875 hp: 88,8876 attack: 112,8877 defense: 75,8878 special_attack: 102,8879 special_defense: 80,8880 speed: 143,8881 },8882 {8883 id: 808,8884 name: 'Meltan',8885 type: ['Steel'],8886 hp: 46,8887 attack: 65,8888 defense: 65,8889 special_attack: 55,8890 special_defense: 35,8891 speed: 34,8892 },8893 {8894 id: 809,8895 name: 'Melmetal',8896 type: ['Steel'],8897 hp: 135,8898 attack: 143,8899 defense: 143,8900 special_attack: 80,8901 special_defense: 65,8902 speed: 34,8903 },8904 ])...
test_basic.py
Source:test_basic.py
1# this program corresponds to special.py2### Means test is not done yet3# E Means test is giving error (E)4# F Means test is failing (F)5# EF Means test is giving error and Failing6#! Means test is segfaulting7# 8 Means test runs forever8### test_besselpoly9### test_mathieu_a10### test_mathieu_even_coef11### test_mathieu_odd_coef12### test_modfresnelp13### test_modfresnelm14# test_pbdv_seq15### test_pbvv_seq16### test_sph_harm17from __future__ import division, print_function, absolute_import18import itertools19import numpy as np20from numpy import (array, isnan, r_, arange, finfo, pi, sin, cos, tan, exp,21 log, zeros, sqrt, asarray, inf, nan_to_num, real, arctan, float_)22import pytest23from pytest import raises as assert_raises24from numpy.testing import (assert_equal, assert_almost_equal,25 assert_array_equal, assert_array_almost_equal, assert_approx_equal,26 assert_, assert_allclose,27 assert_array_almost_equal_nulp)28from scipy import special29import scipy.special._ufuncs as cephes30from scipy.special import ellipk, zeta31from scipy.special._testutils import with_special_errors, \32 assert_func_equal, FuncData33from scipy._lib._numpy_compat import suppress_warnings34from scipy._lib._version import NumpyVersion35import math36class TestCephes(object):37 def test_airy(self):38 cephes.airy(0)39 def test_airye(self):40 cephes.airye(0)41 def test_binom(self):42 n = np.array([0.264, 4, 5.2, 17])43 k = np.array([2, 0.4, 7, 3.3])44 nk = np.array(np.broadcast_arrays(n[:,None], k[None,:])45 ).reshape(2, -1).T46 rknown = np.array([[-0.097152, 0.9263051596159367, 0.01858423645695389,47 -0.007581020651518199],[6, 2.0214389119675666, 0, 2.9827344527963846],48 [10.92, 2.22993515861399, -0.00585728, 10.468891352063146],49 [136, 3.5252179590758828, 19448, 1024.5526916174495]])50 assert_func_equal(cephes.binom, rknown.ravel(), nk, rtol=1e-13)51 # Test branches in implementation52 np.random.seed(1234)53 n = np.r_[np.arange(-7, 30), 1000*np.random.rand(30) - 500]54 k = np.arange(0, 102)55 nk = np.array(np.broadcast_arrays(n[:,None], k[None,:])56 ).reshape(2, -1).T57 assert_func_equal(cephes.binom,58 cephes.binom(nk[:,0], nk[:,1] * (1 + 1e-15)),59 nk,60 atol=1e-10, rtol=1e-10)61 def test_binom_2(self):62 # Test branches in implementation63 np.random.seed(1234)64 n = np.r_[np.logspace(1, 300, 20)]65 k = np.arange(0, 102)66 nk = np.array(np.broadcast_arrays(n[:,None], k[None,:])67 ).reshape(2, -1).T68 assert_func_equal(cephes.binom,69 cephes.binom(nk[:,0], nk[:,1] * (1 + 1e-15)),70 nk,71 atol=1e-10, rtol=1e-10)72 def test_binom_exact(self):73 @np.vectorize74 def binom_int(n, k):75 n = int(n)76 k = int(k)77 num = int(1)78 den = int(1)79 for i in range(1, k+1):80 num *= i + n - k81 den *= i82 return float(num/den)83 np.random.seed(1234)84 n = np.arange(1, 15)85 k = np.arange(0, 15)86 nk = np.array(np.broadcast_arrays(n[:,None], k[None,:])87 ).reshape(2, -1).T88 nk = nk[nk[:,0] >= nk[:,1]]89 assert_func_equal(cephes.binom,90 binom_int(nk[:,0], nk[:,1]),91 nk,92 atol=0, rtol=0)93 def test_binom_nooverflow_8346(self):94 # Test (binom(n, k) doesn't overflow prematurely */95 dataset = [96 (1000, 500, 2.70288240945436551e+299),97 (1002, 501, 1.08007396880791225e+300),98 (1004, 502, 4.31599279169058121e+300),99 (1006, 503, 1.72468101616263781e+301),100 (1008, 504, 6.89188009236419153e+301),101 (1010, 505, 2.75402257948335448e+302),102 (1012, 506, 1.10052048531923757e+303),103 (1014, 507, 4.39774063758732849e+303),104 (1016, 508, 1.75736486108312519e+304),105 (1018, 509, 7.02255427788423734e+304),106 (1020, 510, 2.80626776829962255e+305),107 (1022, 511, 1.12140876377061240e+306),108 (1024, 512, 4.48125455209897109e+306),109 (1026, 513, 1.79075474304149900e+307),110 (1028, 514, 7.15605105487789676e+307)111 ]112 dataset = np.asarray(dataset)113 FuncData(cephes.binom, dataset, (0, 1), 2, rtol=1e-12).check()114 def test_bdtr(self):115 assert_equal(cephes.bdtr(1,1,0.5),1.0)116 def test_bdtri(self):117 assert_equal(cephes.bdtri(1,3,0.5),0.5)118 def test_bdtrc(self):119 assert_equal(cephes.bdtrc(1,3,0.5),0.5)120 def test_bdtrin(self):121 assert_equal(cephes.bdtrin(1,0,1),5.0)122 def test_bdtrik(self):123 cephes.bdtrik(1,3,0.5)124 def test_bei(self):125 assert_equal(cephes.bei(0),0.0)126 def test_beip(self):127 assert_equal(cephes.beip(0),0.0)128 def test_ber(self):129 assert_equal(cephes.ber(0),1.0)130 def test_berp(self):131 assert_equal(cephes.berp(0),0.0)132 def test_besselpoly(self):133 assert_equal(cephes.besselpoly(0,0,0),1.0)134 def test_beta(self):135 assert_equal(cephes.beta(1,1),1.0)136 assert_allclose(cephes.beta(-100.3, 1e-200), cephes.gamma(1e-200))137 assert_allclose(cephes.beta(0.0342, 171), 24.070498359873497,138 rtol=1e-13, atol=0)139 def test_betainc(self):140 assert_equal(cephes.betainc(1,1,1),1.0)141 assert_allclose(cephes.betainc(0.0342, 171, 1e-10), 0.55269916901806648)142 def test_betaln(self):143 assert_equal(cephes.betaln(1,1),0.0)144 assert_allclose(cephes.betaln(-100.3, 1e-200), cephes.gammaln(1e-200))145 assert_allclose(cephes.betaln(0.0342, 170), 3.1811881124242447,146 rtol=1e-14, atol=0)147 def test_betaincinv(self):148 assert_equal(cephes.betaincinv(1,1,1),1.0)149 assert_allclose(cephes.betaincinv(0.0342, 171, 0.25),150 8.4231316935498957e-21, rtol=3e-12, atol=0)151 def test_beta_inf(self):152 assert_(np.isinf(special.beta(-1, 2)))153 def test_btdtr(self):154 assert_equal(cephes.btdtr(1,1,1),1.0)155 def test_btdtri(self):156 assert_equal(cephes.btdtri(1,1,1),1.0)157 def test_btdtria(self):158 assert_equal(cephes.btdtria(1,1,1),5.0)159 def test_btdtrib(self):160 assert_equal(cephes.btdtrib(1,1,1),5.0)161 def test_cbrt(self):162 assert_approx_equal(cephes.cbrt(1),1.0)163 def test_chdtr(self):164 assert_equal(cephes.chdtr(1,0),0.0)165 def test_chdtrc(self):166 assert_equal(cephes.chdtrc(1,0),1.0)167 def test_chdtri(self):168 assert_equal(cephes.chdtri(1,1),0.0)169 def test_chdtriv(self):170 assert_equal(cephes.chdtriv(0,0),5.0)171 def test_chndtr(self):172 assert_equal(cephes.chndtr(0,1,0),0.0)173 # Each row holds (x, nu, lam, expected_value)174 # These values were computed using Wolfram Alpha with175 # CDF[NoncentralChiSquareDistribution[nu, lam], x]176 values = np.array([177 [25.00, 20.0, 400, 4.1210655112396197139e-57],178 [25.00, 8.00, 250, 2.3988026526832425878e-29],179 [0.001, 8.00, 40., 5.3761806201366039084e-24],180 [0.010, 8.00, 40., 5.45396231055999457039e-20],181 [20.00, 2.00, 107, 1.39390743555819597802e-9],182 [22.50, 2.00, 107, 7.11803307138105870671e-9],183 [25.00, 2.00, 107, 3.11041244829864897313e-8],184 [3.000, 2.00, 1.0, 0.62064365321954362734],185 [350.0, 300., 10., 0.93880128006276407710],186 [100.0, 13.5, 10., 0.99999999650104210949],187 [700.0, 20.0, 400, 0.99999999925680650105],188 [150.0, 13.5, 10., 0.99999999999999983046],189 [160.0, 13.5, 10., 0.99999999999999999518], # 1.0190 ])191 cdf = cephes.chndtr(values[:, 0], values[:, 1], values[:, 2])192 assert_allclose(cdf, values[:, 3], rtol=1e-12)193 assert_almost_equal(cephes.chndtr(np.inf, np.inf, 0), 2.0)194 assert_almost_equal(cephes.chndtr(2, 1, np.inf), 0.0)195 assert_(np.isnan(cephes.chndtr(np.nan, 1, 2)))196 assert_(np.isnan(cephes.chndtr(5, np.nan, 2)))197 assert_(np.isnan(cephes.chndtr(5, 1, np.nan)))198 def test_chndtridf(self):199 assert_equal(cephes.chndtridf(0,0,1),5.0)200 def test_chndtrinc(self):201 assert_equal(cephes.chndtrinc(0,1,0),5.0)202 def test_chndtrix(self):203 assert_equal(cephes.chndtrix(0,1,0),0.0)204 def test_cosdg(self):205 assert_equal(cephes.cosdg(0),1.0)206 def test_cosm1(self):207 assert_equal(cephes.cosm1(0),0.0)208 def test_cotdg(self):209 assert_almost_equal(cephes.cotdg(45),1.0)210 def test_dawsn(self):211 assert_equal(cephes.dawsn(0),0.0)212 assert_allclose(cephes.dawsn(1.23), 0.50053727749081767)213 def test_diric(self):214 # Test behavior near multiples of 2pi. Regression test for issue215 # described in gh-4001.216 n_odd = [1, 5, 25]217 x = np.array(2*np.pi + 5e-5).astype(np.float32)218 assert_almost_equal(special.diric(x, n_odd), 1.0, decimal=7)219 x = np.array(2*np.pi + 1e-9).astype(np.float64)220 assert_almost_equal(special.diric(x, n_odd), 1.0, decimal=15)221 x = np.array(2*np.pi + 1e-15).astype(np.float64)222 assert_almost_equal(special.diric(x, n_odd), 1.0, decimal=15)223 if hasattr(np, 'float128'):224 # No float128 available in 32-bit numpy225 x = np.array(2*np.pi + 1e-12).astype(np.float128)226 assert_almost_equal(special.diric(x, n_odd), 1.0, decimal=19)227 n_even = [2, 4, 24]228 x = np.array(2*np.pi + 1e-9).astype(np.float64)229 assert_almost_equal(special.diric(x, n_even), -1.0, decimal=15)230 # Test at some values not near a multiple of pi231 x = np.arange(0.2*np.pi, 1.0*np.pi, 0.2*np.pi)232 octave_result = [0.872677996249965, 0.539344662916632,233 0.127322003750035, -0.206011329583298]234 assert_almost_equal(special.diric(x, 3), octave_result, decimal=15)235 def test_diric_broadcasting(self):236 x = np.arange(5)237 n = np.array([1, 3, 7])238 assert_(special.diric(x[:, np.newaxis], n).shape == (x.size, n.size))239 def test_ellipe(self):240 assert_equal(cephes.ellipe(1),1.0)241 def test_ellipeinc(self):242 assert_equal(cephes.ellipeinc(0,1),0.0)243 def test_ellipj(self):244 cephes.ellipj(0,1)245 def test_ellipk(self):246 assert_allclose(ellipk(0), pi/2)247 def test_ellipkinc(self):248 assert_equal(cephes.ellipkinc(0,0),0.0)249 def test_erf(self):250 assert_equal(cephes.erf(0), 0.0)251 def test_erf_symmetry(self):252 x = 5.905732037710919253 assert_equal(cephes.erf(x) + cephes.erf(-x), 0.0)254 def test_erfc(self):255 assert_equal(cephes.erfc(0), 1.0)256 def test_exp1(self):257 cephes.exp1(1)258 def test_expi(self):259 cephes.expi(1)260 def test_expn(self):261 cephes.expn(1,1)262 def test_exp1_reg(self):263 # Regression for #834264 a = cephes.exp1(-complex(19.9999990))265 b = cephes.exp1(-complex(19.9999991))266 assert_array_almost_equal(a.imag, b.imag)267 def test_exp10(self):268 assert_approx_equal(cephes.exp10(2),100.0)269 def test_exp2(self):270 assert_equal(cephes.exp2(2),4.0)271 def test_expm1(self):272 assert_equal(cephes.expm1(0),0.0)273 assert_equal(cephes.expm1(np.inf), np.inf)274 assert_equal(cephes.expm1(-np.inf), -1)275 assert_equal(cephes.expm1(np.nan), np.nan)276 # Earlier numpy version don't guarantee that npy_cexp conforms to C99.277 @pytest.mark.skipif(NumpyVersion(np.__version__) < '1.9.0', reason='')278 def test_expm1_complex(self):279 expm1 = cephes.expm1280 assert_equal(expm1(0 + 0j), 0 + 0j)281 assert_equal(expm1(complex(np.inf, 0)), complex(np.inf, 0))282 assert_equal(expm1(complex(np.inf, 1)), complex(np.inf, np.inf))283 assert_equal(expm1(complex(np.inf, 2)), complex(-np.inf, np.inf))284 assert_equal(expm1(complex(np.inf, 4)), complex(-np.inf, -np.inf))285 assert_equal(expm1(complex(np.inf, 5)), complex(np.inf, -np.inf))286 assert_equal(expm1(complex(1, np.inf)), complex(np.nan, np.nan))287 assert_equal(expm1(complex(0, np.inf)), complex(np.nan, np.nan))288 assert_equal(expm1(complex(np.inf, np.inf)), complex(np.inf, np.nan))289 assert_equal(expm1(complex(-np.inf, np.inf)), complex(-1, 0))290 assert_equal(expm1(complex(-np.inf, np.nan)), complex(-1, 0))291 assert_equal(expm1(complex(np.inf, np.nan)), complex(np.inf, np.nan))292 assert_equal(expm1(complex(0, np.nan)), complex(np.nan, np.nan))293 assert_equal(expm1(complex(1, np.nan)), complex(np.nan, np.nan))294 assert_equal(expm1(complex(np.nan, 1)), complex(np.nan, np.nan))295 assert_equal(expm1(complex(np.nan, np.nan)), complex(np.nan, np.nan))296 @pytest.mark.xfail(reason='The real part of expm1(z) bad at these points')297 def test_expm1_complex_hard(self):298 # The real part of this function is difficult to evaluate when299 # z.real = -log(cos(z.imag)).300 y = np.array([0.1, 0.2, 0.3, 5, 11, 20])301 x = -np.log(np.cos(y))302 z = x + 1j*y303 # evaluate using mpmath.expm1 with dps=1000304 expected = np.array([-5.5507901846769623e-17+0.10033467208545054j,305 2.4289354732893695e-18+0.20271003550867248j,306 4.5235500262585768e-17+0.30933624960962319j,307 7.8234305217489006e-17-3.3805150062465863j,308 -1.3685191953697676e-16-225.95084645419513j,309 8.7175620481291045e-17+2.2371609442247422j])310 found = cephes.expm1(z)311 # this passes.312 assert_array_almost_equal_nulp(found.imag, expected.imag, 3)313 # this fails.314 assert_array_almost_equal_nulp(found.real, expected.real, 20)315 def test_fdtr(self):316 assert_equal(cephes.fdtr(1, 1, 0), 0.0)317 # Computed using Wolfram Alpha: CDF[FRatioDistribution[1e-6, 5], 10]318 assert_allclose(cephes.fdtr(1e-6, 5, 10), 0.9999940790193488,319 rtol=1e-12)320 def test_fdtrc(self):321 assert_equal(cephes.fdtrc(1, 1, 0), 1.0)322 # Computed using Wolfram Alpha:323 # 1 - CDF[FRatioDistribution[2, 1/10], 1e10]324 assert_allclose(cephes.fdtrc(2, 0.1, 1e10), 0.27223784621293512,325 rtol=1e-12)326 def test_fdtri(self):327 assert_allclose(cephes.fdtri(1, 1, [0.499, 0.501]),328 array([0.9937365, 1.00630298]), rtol=1e-6)329 # From Wolfram Alpha:330 # CDF[FRatioDistribution[1/10, 1], 3] = 0.8756751669632105666874...331 p = 0.8756751669632105666874332 assert_allclose(cephes.fdtri(0.1, 1, p), 3, rtol=1e-12)333 @pytest.mark.xfail(reason='Returns nan on i686.')334 def test_fdtri_mysterious_failure(self):335 assert_allclose(cephes.fdtri(1, 1, 0.5), 1)336 def test_fdtridfd(self):337 assert_equal(cephes.fdtridfd(1,0,0),5.0)338 def test_fresnel(self):339 assert_equal(cephes.fresnel(0),(0.0,0.0))340 def test_gamma(self):341 assert_equal(cephes.gamma(5),24.0)342 def test_gammainc(self):343 assert_equal(cephes.gammainc(5,0),0.0)344 def test_gammaincc(self):345 assert_equal(cephes.gammaincc(5,0),1.0)346 def test_gammainccinv(self):347 assert_equal(cephes.gammainccinv(5,1),0.0)348 def test_gammaln(self):349 cephes.gammaln(10)350 def test_gammasgn(self):351 vals = np.array([-4, -3.5, -2.3, 1, 4.2], np.float64)352 assert_array_equal(cephes.gammasgn(vals), np.sign(cephes.rgamma(vals)))353 def test_gdtr(self):354 assert_equal(cephes.gdtr(1,1,0),0.0)355 def test_gdtr_inf(self):356 assert_equal(cephes.gdtr(1,1,np.inf),1.0)357 def test_gdtrc(self):358 assert_equal(cephes.gdtrc(1,1,0),1.0)359 def test_gdtria(self):360 assert_equal(cephes.gdtria(0,1,1),0.0)361 def test_gdtrib(self):362 cephes.gdtrib(1,0,1)363 # assert_equal(cephes.gdtrib(1,0,1),5.0)364 def test_gdtrix(self):365 cephes.gdtrix(1,1,.1)366 def test_hankel1(self):367 cephes.hankel1(1,1)368 def test_hankel1e(self):369 cephes.hankel1e(1,1)370 def test_hankel2(self):371 cephes.hankel2(1,1)372 def test_hankel2e(self):373 cephes.hankel2e(1,1)374 def test_hyp1f1(self):375 assert_approx_equal(cephes.hyp1f1(1,1,1), exp(1.0))376 assert_approx_equal(cephes.hyp1f1(3,4,-6), 0.026056422099537251095)377 cephes.hyp1f1(1,1,1)378 def test_hyp2f1(self):379 assert_equal(cephes.hyp2f1(1,1,1,0),1.0)380 def test_hyperu(self):381 assert_equal(cephes.hyperu(0,1,1),1.0)382 def test_i0(self):383 assert_equal(cephes.i0(0),1.0)384 def test_i0e(self):385 assert_equal(cephes.i0e(0),1.0)386 def test_i1(self):387 assert_equal(cephes.i1(0),0.0)388 def test_i1e(self):389 assert_equal(cephes.i1e(0),0.0)390 def test_it2i0k0(self):391 cephes.it2i0k0(1)392 def test_it2j0y0(self):393 cephes.it2j0y0(1)394 def test_it2struve0(self):395 cephes.it2struve0(1)396 def test_itairy(self):397 cephes.itairy(1)398 def test_iti0k0(self):399 assert_equal(cephes.iti0k0(0),(0.0,0.0))400 def test_itj0y0(self):401 assert_equal(cephes.itj0y0(0),(0.0,0.0))402 def test_itmodstruve0(self):403 assert_equal(cephes.itmodstruve0(0),0.0)404 def test_itstruve0(self):405 assert_equal(cephes.itstruve0(0),0.0)406 def test_iv(self):407 assert_equal(cephes.iv(1,0),0.0)408 def _check_ive(self):409 assert_equal(cephes.ive(1,0),0.0)410 def test_j0(self):411 assert_equal(cephes.j0(0),1.0)412 def test_j1(self):413 assert_equal(cephes.j1(0),0.0)414 def test_jn(self):415 assert_equal(cephes.jn(0,0),1.0)416 def test_jv(self):417 assert_equal(cephes.jv(0,0),1.0)418 def _check_jve(self):419 assert_equal(cephes.jve(0,0),1.0)420 def test_k0(self):421 cephes.k0(2)422 def test_k0e(self):423 cephes.k0e(2)424 def test_k1(self):425 cephes.k1(2)426 def test_k1e(self):427 cephes.k1e(2)428 def test_kei(self):429 cephes.kei(2)430 def test_keip(self):431 assert_equal(cephes.keip(0),0.0)432 def test_ker(self):433 cephes.ker(2)434 def test_kerp(self):435 cephes.kerp(2)436 def _check_kelvin(self):437 cephes.kelvin(2)438 def test_kn(self):439 cephes.kn(1,1)440 def test_kolmogi(self):441 assert_equal(cephes.kolmogi(1),0.0)442 assert_(np.isnan(cephes.kolmogi(np.nan)))443 def test_kolmogorov(self):444 assert_equal(cephes.kolmogorov(0), 1.0)445 def test_kolmogp(self):446 assert_equal(cephes._kolmogp(0), -0.0)447 def test_kolmogc(self):448 assert_equal(cephes._kolmogc(0), 0.0)449 def test_kolmogci(self):450 assert_equal(cephes._kolmogci(0), 0.0)451 assert_(np.isnan(cephes._kolmogci(np.nan)))452 def _check_kv(self):453 cephes.kv(1,1)454 def _check_kve(self):455 cephes.kve(1,1)456 def test_log1p(self):457 log1p = cephes.log1p458 assert_equal(log1p(0), 0.0)459 assert_equal(log1p(-1), -np.inf)460 assert_equal(log1p(-2), np.nan)461 assert_equal(log1p(np.inf), np.inf)462 # earlier numpy version don't guarantee that npy_clog conforms to C99463 @pytest.mark.skipif(NumpyVersion(np.__version__) < '1.9.0', reason='')464 def test_log1p_complex(self):465 log1p = cephes.log1p466 c = complex467 assert_equal(log1p(0 + 0j), 0 + 0j)468 assert_equal(log1p(c(-1, 0)), c(-np.inf, 0))469 with suppress_warnings() as sup:470 sup.filter(RuntimeWarning, "invalid value encountered in multiply")471 assert_allclose(log1p(c(1, np.inf)), c(np.inf, np.pi/2))472 assert_equal(log1p(c(1, np.nan)), c(np.nan, np.nan))473 assert_allclose(log1p(c(-np.inf, 1)), c(np.inf, np.pi))474 assert_equal(log1p(c(np.inf, 1)), c(np.inf, 0))475 assert_allclose(log1p(c(-np.inf, np.inf)), c(np.inf, 3*np.pi/4))476 assert_allclose(log1p(c(np.inf, np.inf)), c(np.inf, np.pi/4))477 assert_equal(log1p(c(np.inf, np.nan)), c(np.inf, np.nan))478 assert_equal(log1p(c(-np.inf, np.nan)), c(np.inf, np.nan))479 assert_equal(log1p(c(np.nan, np.inf)), c(np.inf, np.nan))480 assert_equal(log1p(c(np.nan, 1)), c(np.nan, np.nan))481 assert_equal(log1p(c(np.nan, np.nan)), c(np.nan, np.nan))482 def test_lpmv(self):483 assert_equal(cephes.lpmv(0,0,1),1.0)484 def test_mathieu_a(self):485 assert_equal(cephes.mathieu_a(1,0),1.0)486 def test_mathieu_b(self):487 assert_equal(cephes.mathieu_b(1,0),1.0)488 def test_mathieu_cem(self):489 assert_equal(cephes.mathieu_cem(1,0,0),(1.0,0.0))490 # Test AMS 20.2.27491 @np.vectorize492 def ce_smallq(m, q, z):493 z *= np.pi/180494 if m == 0:495 return 2**(-0.5) * (1 - .5*q*cos(2*z)) # + O(q^2)496 elif m == 1:497 return cos(z) - q/8 * cos(3*z) # + O(q^2)498 elif m == 2:499 return cos(2*z) - q*(cos(4*z)/12 - 1/4) # + O(q^2)500 else:501 return cos(m*z) - q*(cos((m+2)*z)/(4*(m+1)) - cos((m-2)*z)/(4*(m-1))) # + O(q^2)502 m = np.arange(0, 100)503 q = np.r_[0, np.logspace(-30, -9, 10)]504 assert_allclose(cephes.mathieu_cem(m[:,None], q[None,:], 0.123)[0],505 ce_smallq(m[:,None], q[None,:], 0.123),506 rtol=1e-14, atol=0)507 def test_mathieu_sem(self):508 assert_equal(cephes.mathieu_sem(1,0,0),(0.0,1.0))509 # Test AMS 20.2.27510 @np.vectorize511 def se_smallq(m, q, z):512 z *= np.pi/180513 if m == 1:514 return sin(z) - q/8 * sin(3*z) # + O(q^2)515 elif m == 2:516 return sin(2*z) - q*sin(4*z)/12 # + O(q^2)517 else:518 return sin(m*z) - q*(sin((m+2)*z)/(4*(m+1)) - sin((m-2)*z)/(4*(m-1))) # + O(q^2)519 m = np.arange(1, 100)520 q = np.r_[0, np.logspace(-30, -9, 10)]521 assert_allclose(cephes.mathieu_sem(m[:,None], q[None,:], 0.123)[0],522 se_smallq(m[:,None], q[None,:], 0.123),523 rtol=1e-14, atol=0)524 def test_mathieu_modcem1(self):525 assert_equal(cephes.mathieu_modcem1(1,0,0),(0.0,0.0))526 def test_mathieu_modcem2(self):527 cephes.mathieu_modcem2(1,1,1)528 # Test reflection relation AMS 20.6.19529 m = np.arange(0, 4)[:,None,None]530 q = np.r_[np.logspace(-2, 2, 10)][None,:,None]531 z = np.linspace(0, 1, 7)[None,None,:]532 y1 = cephes.mathieu_modcem2(m, q, -z)[0]533 fr = -cephes.mathieu_modcem2(m, q, 0)[0] / cephes.mathieu_modcem1(m, q, 0)[0]534 y2 = -cephes.mathieu_modcem2(m, q, z)[0] - 2*fr*cephes.mathieu_modcem1(m, q, z)[0]535 assert_allclose(y1, y2, rtol=1e-10)536 def test_mathieu_modsem1(self):537 assert_equal(cephes.mathieu_modsem1(1,0,0),(0.0,0.0))538 def test_mathieu_modsem2(self):539 cephes.mathieu_modsem2(1,1,1)540 # Test reflection relation AMS 20.6.20541 m = np.arange(1, 4)[:,None,None]542 q = np.r_[np.logspace(-2, 2, 10)][None,:,None]543 z = np.linspace(0, 1, 7)[None,None,:]544 y1 = cephes.mathieu_modsem2(m, q, -z)[0]545 fr = cephes.mathieu_modsem2(m, q, 0)[1] / cephes.mathieu_modsem1(m, q, 0)[1]546 y2 = cephes.mathieu_modsem2(m, q, z)[0] - 2*fr*cephes.mathieu_modsem1(m, q, z)[0]547 assert_allclose(y1, y2, rtol=1e-10)548 def test_mathieu_overflow(self):549 # Check that these return NaNs instead of causing a SEGV550 assert_equal(cephes.mathieu_cem(10000, 0, 1.3), (np.nan, np.nan))551 assert_equal(cephes.mathieu_sem(10000, 0, 1.3), (np.nan, np.nan))552 assert_equal(cephes.mathieu_cem(10000, 1.5, 1.3), (np.nan, np.nan))553 assert_equal(cephes.mathieu_sem(10000, 1.5, 1.3), (np.nan, np.nan))554 assert_equal(cephes.mathieu_modcem1(10000, 1.5, 1.3), (np.nan, np.nan))555 assert_equal(cephes.mathieu_modsem1(10000, 1.5, 1.3), (np.nan, np.nan))556 assert_equal(cephes.mathieu_modcem2(10000, 1.5, 1.3), (np.nan, np.nan))557 assert_equal(cephes.mathieu_modsem2(10000, 1.5, 1.3), (np.nan, np.nan))558 def test_mathieu_ticket_1847(self):559 # Regression test --- this call had some out-of-bounds access560 # and could return nan occasionally561 for k in range(60):562 v = cephes.mathieu_modsem2(2, 100, -1)563 # Values from ACM TOMS 804 (derivate by numerical differentiation)564 assert_allclose(v[0], 0.1431742913063671074347, rtol=1e-10)565 assert_allclose(v[1], 0.9017807375832909144719, rtol=1e-4)566 def test_modfresnelm(self):567 cephes.modfresnelm(0)568 def test_modfresnelp(self):569 cephes.modfresnelp(0)570 def _check_modstruve(self):571 assert_equal(cephes.modstruve(1,0),0.0)572 def test_nbdtr(self):573 assert_equal(cephes.nbdtr(1,1,1),1.0)574 def test_nbdtrc(self):575 assert_equal(cephes.nbdtrc(1,1,1),0.0)576 def test_nbdtri(self):577 assert_equal(cephes.nbdtri(1,1,1),1.0)578 def __check_nbdtrik(self):579 cephes.nbdtrik(1,.4,.5)580 def test_nbdtrin(self):581 assert_equal(cephes.nbdtrin(1,0,0),5.0)582 def test_ncfdtr(self):583 assert_equal(cephes.ncfdtr(1,1,1,0),0.0)584 def test_ncfdtri(self):585 assert_equal(cephes.ncfdtri(1, 1, 1, 0), 0.0)586 f = [0.5, 1, 1.5]587 p = cephes.ncfdtr(2, 3, 1.5, f)588 assert_allclose(cephes.ncfdtri(2, 3, 1.5, p), f)589 def test_ncfdtridfd(self):590 dfd = [1, 2, 3]591 p = cephes.ncfdtr(2, dfd, 0.25, 15)592 assert_allclose(cephes.ncfdtridfd(2, p, 0.25, 15), dfd)593 def test_ncfdtridfn(self):594 dfn = [0.1, 1, 2, 3, 1e4]595 p = cephes.ncfdtr(dfn, 2, 0.25, 15)596 assert_allclose(cephes.ncfdtridfn(p, 2, 0.25, 15), dfn, rtol=1e-5)597 def test_ncfdtrinc(self):598 nc = [0.5, 1.5, 2.0]599 p = cephes.ncfdtr(2, 3, nc, 15)600 assert_allclose(cephes.ncfdtrinc(2, 3, p, 15), nc)601 def test_nctdtr(self):602 assert_equal(cephes.nctdtr(1,0,0),0.5)603 assert_equal(cephes.nctdtr(9, 65536, 45), 0.0)604 assert_approx_equal(cephes.nctdtr(np.inf, 1., 1.), 0.5, 5)605 assert_(np.isnan(cephes.nctdtr(2., np.inf, 10.)))606 assert_approx_equal(cephes.nctdtr(2., 1., np.inf), 1.)607 assert_(np.isnan(cephes.nctdtr(np.nan, 1., 1.)))608 assert_(np.isnan(cephes.nctdtr(2., np.nan, 1.)))609 assert_(np.isnan(cephes.nctdtr(2., 1., np.nan)))610 def __check_nctdtridf(self):611 cephes.nctdtridf(1,0.5,0)612 def test_nctdtrinc(self):613 cephes.nctdtrinc(1,0,0)614 def test_nctdtrit(self):615 cephes.nctdtrit(.1,0.2,.5)616 def test_ndtr(self):617 assert_equal(cephes.ndtr(0), 0.5)618 assert_almost_equal(cephes.ndtr(1), 0.84134474606)619 def test_ndtri(self):620 assert_equal(cephes.ndtri(0.5),0.0)621 def test_nrdtrimn(self):622 assert_approx_equal(cephes.nrdtrimn(0.5,1,1),1.0)623 def test_nrdtrisd(self):624 assert_allclose(cephes.nrdtrisd(0.5,0.5,0.5), 0.0,625 atol=0, rtol=0)626 def test_obl_ang1(self):627 cephes.obl_ang1(1,1,1,0)628 def test_obl_ang1_cv(self):629 result = cephes.obl_ang1_cv(1,1,1,1,0)630 assert_almost_equal(result[0],1.0)631 assert_almost_equal(result[1],0.0)632 def _check_obl_cv(self):633 assert_equal(cephes.obl_cv(1,1,0),2.0)634 def test_obl_rad1(self):635 cephes.obl_rad1(1,1,1,0)636 def test_obl_rad1_cv(self):637 cephes.obl_rad1_cv(1,1,1,1,0)638 def test_obl_rad2(self):639 cephes.obl_rad2(1,1,1,0)640 def test_obl_rad2_cv(self):641 cephes.obl_rad2_cv(1,1,1,1,0)642 def test_pbdv(self):643 assert_equal(cephes.pbdv(1,0),(0.0,1.0))644 def test_pbvv(self):645 cephes.pbvv(1,0)646 def test_pbwa(self):647 cephes.pbwa(1,0)648 def test_pdtr(self):649 val = cephes.pdtr(0, 1)650 assert_almost_equal(val, np.exp(-1))651 # Edge case: m = 0.652 val = cephes.pdtr([0, 1, 2], 0.0)653 assert_array_equal(val, [1, 1, 1])654 def test_pdtrc(self):655 val = cephes.pdtrc(0, 1)656 assert_almost_equal(val, 1 - np.exp(-1))657 # Edge case: m = 0.658 val = cephes.pdtrc([0, 1, 2], 0.0)659 assert_array_equal(val, [0, 0, 0])660 def test_pdtri(self):661 with suppress_warnings() as sup:662 sup.filter(RuntimeWarning, "floating point number truncated to an integer")663 cephes.pdtri(0.5,0.5)664 def test_pdtrik(self):665 k = cephes.pdtrik(0.5, 1)666 assert_almost_equal(cephes.gammaincc(k + 1, 1), 0.5)667 # Edge case: m = 0 or very small.668 k = cephes.pdtrik([[0], [0.25], [0.95]], [0, 1e-20, 1e-6])669 assert_array_equal(k, np.zeros((3, 3)))670 def test_pro_ang1(self):671 cephes.pro_ang1(1,1,1,0)672 def test_pro_ang1_cv(self):673 assert_array_almost_equal(cephes.pro_ang1_cv(1,1,1,1,0),674 array((1.0,0.0)))675 def _check_pro_cv(self):676 assert_equal(cephes.pro_cv(1,1,0),2.0)677 def test_pro_rad1(self):678 cephes.pro_rad1(1,1,1,0.1)679 def test_pro_rad1_cv(self):680 cephes.pro_rad1_cv(1,1,1,1,0)681 def test_pro_rad2(self):682 cephes.pro_rad2(1,1,1,0)683 def test_pro_rad2_cv(self):684 cephes.pro_rad2_cv(1,1,1,1,0)685 def test_psi(self):686 cephes.psi(1)687 def test_radian(self):688 assert_equal(cephes.radian(0,0,0),0)689 def test_rgamma(self):690 assert_equal(cephes.rgamma(1),1.0)691 def test_round(self):692 assert_equal(cephes.round(3.4),3.0)693 assert_equal(cephes.round(-3.4),-3.0)694 assert_equal(cephes.round(3.6),4.0)695 assert_equal(cephes.round(-3.6),-4.0)696 assert_equal(cephes.round(3.5),4.0)697 assert_equal(cephes.round(-3.5),-4.0)698 def test_shichi(self):699 cephes.shichi(1)700 def test_sici(self):701 cephes.sici(1)702 s, c = cephes.sici(np.inf)703 assert_almost_equal(s, np.pi * 0.5)704 assert_almost_equal(c, 0)705 s, c = cephes.sici(-np.inf)706 assert_almost_equal(s, -np.pi * 0.5)707 assert_(np.isnan(c), "cosine integral(-inf) is not nan")708 def test_sindg(self):709 assert_equal(cephes.sindg(90),1.0)710 def test_smirnov(self):711 assert_equal(cephes.smirnov(1,.1),0.9)712 assert_(np.isnan(cephes.smirnov(1,np.nan)))713 def test_smirnovp(self):714 assert_equal(cephes._smirnovp(1, .1), -1)715 assert_equal(cephes._smirnovp(2, 0.75), -2*(0.25)**(2-1))716 assert_equal(cephes._smirnovp(3, 0.75), -3*(0.25)**(3-1))717 assert_(np.isnan(cephes._smirnovp(1, np.nan)))718 def test_smirnovc(self):719 assert_equal(cephes._smirnovc(1,.1),0.1)720 assert_(np.isnan(cephes._smirnovc(1,np.nan)))721 x10 = np.linspace(0, 1, 11, endpoint=True)722 assert_almost_equal(cephes._smirnovc(3, x10), 1-cephes.smirnov(3, x10))723 x4 = np.linspace(0, 1, 5, endpoint=True)724 assert_almost_equal(cephes._smirnovc(4, x4), 1-cephes.smirnov(4, x4))725 def test_smirnovi(self):726 assert_almost_equal(cephes.smirnov(1,cephes.smirnovi(1,0.4)),0.4)727 assert_almost_equal(cephes.smirnov(1,cephes.smirnovi(1,0.6)),0.6)728 assert_(np.isnan(cephes.smirnovi(1,np.nan)))729 def test_smirnovci(self):730 assert_almost_equal(cephes._smirnovc(1,cephes._smirnovci(1,0.4)),0.4)731 assert_almost_equal(cephes._smirnovc(1,cephes._smirnovci(1,0.6)),0.6)732 assert_(np.isnan(cephes._smirnovci(1,np.nan)))733 def test_spence(self):734 assert_equal(cephes.spence(1),0.0)735 def test_stdtr(self):736 assert_equal(cephes.stdtr(1,0),0.5)737 assert_almost_equal(cephes.stdtr(1,1), 0.75)738 assert_almost_equal(cephes.stdtr(1,2), 0.852416382349)739 def test_stdtridf(self):740 cephes.stdtridf(0.7,1)741 def test_stdtrit(self):742 cephes.stdtrit(1,0.7)743 def test_struve(self):744 assert_equal(cephes.struve(0,0),0.0)745 def test_tandg(self):746 assert_equal(cephes.tandg(45),1.0)747 def test_tklmbda(self):748 assert_almost_equal(cephes.tklmbda(1,1),1.0)749 def test_y0(self):750 cephes.y0(1)751 def test_y1(self):752 cephes.y1(1)753 def test_yn(self):754 cephes.yn(1,1)755 def test_yv(self):756 cephes.yv(1,1)757 def _check_yve(self):758 cephes.yve(1,1)759 def test_wofz(self):760 z = [complex(624.2,-0.26123), complex(-0.4,3.), complex(0.6,2.),761 complex(-1.,1.), complex(-1.,-9.), complex(-1.,9.),762 complex(-0.0000000234545,1.1234), complex(-3.,5.1),763 complex(-53,30.1), complex(0.0,0.12345),764 complex(11,1), complex(-22,-2), complex(9,-28),765 complex(21,-33), complex(1e5,1e5), complex(1e14,1e14)766 ]767 w = [768 complex(-3.78270245518980507452677445620103199303131110e-7,769 0.000903861276433172057331093754199933411710053155),770 complex(0.1764906227004816847297495349730234591778719532788,771 -0.02146550539468457616788719893991501311573031095617),772 complex(0.2410250715772692146133539023007113781272362309451,773 0.06087579663428089745895459735240964093522265589350),774 complex(0.30474420525691259245713884106959496013413834051768,775 -0.20821893820283162728743734725471561394145872072738),776 complex(7.317131068972378096865595229600561710140617977e34,777 8.321873499714402777186848353320412813066170427e34),778 complex(0.0615698507236323685519612934241429530190806818395,779 -0.00676005783716575013073036218018565206070072304635),780 complex(0.3960793007699874918961319170187598400134746631,781 -5.593152259116644920546186222529802777409274656e-9),782 complex(0.08217199226739447943295069917990417630675021771804,783 -0.04701291087643609891018366143118110965272615832184),784 complex(0.00457246000350281640952328010227885008541748668738,785 -0.00804900791411691821818731763401840373998654987934),786 complex(0.8746342859608052666092782112565360755791467973338452,787 0.),788 complex(0.00468190164965444174367477874864366058339647648741,789 0.0510735563901306197993676329845149741675029197050),790 complex(-0.0023193175200187620902125853834909543869428763219,791 -0.025460054739731556004902057663500272721780776336),792 complex(9.11463368405637174660562096516414499772662584e304,793 3.97101807145263333769664875189354358563218932e305),794 complex(-4.4927207857715598976165541011143706155432296e281,795 -2.8019591213423077494444700357168707775769028e281),796 complex(2.820947917809305132678577516325951485807107151e-6,797 2.820947917668257736791638444590253942253354058e-6),798 complex(2.82094791773878143474039725787438662716372268e-15,799 2.82094791773878143474039725773333923127678361e-15)800 ]801 assert_func_equal(cephes.wofz, w, z, rtol=1e-13)802class TestAiry(object):803 def test_airy(self):804 # This tests the airy function to ensure 8 place accuracy in computation805 x = special.airy(.99)806 assert_array_almost_equal(x,array([0.13689066,-0.16050153,1.19815925,0.92046818]),8)807 x = special.airy(.41)808 assert_array_almost_equal(x,array([0.25238916,-.23480512,0.80686202,0.51053919]),8)809 x = special.airy(-.36)810 assert_array_almost_equal(x,array([0.44508477,-0.23186773,0.44939534,0.48105354]),8)811 def test_airye(self):812 a = special.airye(0.01)813 b = special.airy(0.01)814 b1 = [None]*4815 for n in range(2):816 b1[n] = b[n]*exp(2.0/3.0*0.01*sqrt(0.01))817 for n in range(2,4):818 b1[n] = b[n]*exp(-abs(real(2.0/3.0*0.01*sqrt(0.01))))819 assert_array_almost_equal(a,b1,6)820 def test_bi_zeros(self):821 bi = special.bi_zeros(2)822 bia = (array([-1.17371322, -3.2710930]),823 array([-2.29443968, -4.07315509]),824 array([-0.45494438, 0.39652284]),825 array([0.60195789, -0.76031014]))826 assert_array_almost_equal(bi,bia,4)827 bi = special.bi_zeros(5)828 assert_array_almost_equal(bi[0],array([-1.173713222709127,829 -3.271093302836352,830 -4.830737841662016,831 -6.169852128310251,832 -7.376762079367764]),11)833 assert_array_almost_equal(bi[1],array([-2.294439682614122,834 -4.073155089071828,835 -5.512395729663599,836 -6.781294445990305,837 -7.940178689168587]),10)838 assert_array_almost_equal(bi[2],array([-0.454944383639657,839 0.396522836094465,840 -0.367969161486959,841 0.349499116831805,842 -0.336026240133662]),11)843 assert_array_almost_equal(bi[3],array([0.601957887976239,844 -0.760310141492801,845 0.836991012619261,846 -0.88947990142654,847 0.929983638568022]),10)848 def test_ai_zeros(self):849 ai = special.ai_zeros(1)850 assert_array_almost_equal(ai,(array([-2.33810741]),851 array([-1.01879297]),852 array([0.5357]),853 array([0.7012])),4)854 def test_ai_zeros_big(self):855 z, zp, ai_zpx, aip_zx = special.ai_zeros(50000)856 ai_z, aip_z, _, _ = special.airy(z)857 ai_zp, aip_zp, _, _ = special.airy(zp)858 ai_envelope = 1/abs(z)**(1./4)859 aip_envelope = abs(zp)**(1./4)860 # Check values861 assert_allclose(ai_zpx, ai_zp, rtol=1e-10)862 assert_allclose(aip_zx, aip_z, rtol=1e-10)863 # Check they are zeros864 assert_allclose(ai_z/ai_envelope, 0, atol=1e-10, rtol=0)865 assert_allclose(aip_zp/aip_envelope, 0, atol=1e-10, rtol=0)866 # Check first zeros, DLMF 9.9.1867 assert_allclose(z[:6],868 [-2.3381074105, -4.0879494441, -5.5205598281,869 -6.7867080901, -7.9441335871, -9.0226508533], rtol=1e-10)870 assert_allclose(zp[:6],871 [-1.0187929716, -3.2481975822, -4.8200992112,872 -6.1633073556, -7.3721772550, -8.4884867340], rtol=1e-10)873 def test_bi_zeros_big(self):874 z, zp, bi_zpx, bip_zx = special.bi_zeros(50000)875 _, _, bi_z, bip_z = special.airy(z)876 _, _, bi_zp, bip_zp = special.airy(zp)877 bi_envelope = 1/abs(z)**(1./4)878 bip_envelope = abs(zp)**(1./4)879 # Check values880 assert_allclose(bi_zpx, bi_zp, rtol=1e-10)881 assert_allclose(bip_zx, bip_z, rtol=1e-10)882 # Check they are zeros883 assert_allclose(bi_z/bi_envelope, 0, atol=1e-10, rtol=0)884 assert_allclose(bip_zp/bip_envelope, 0, atol=1e-10, rtol=0)885 # Check first zeros, DLMF 9.9.2886 assert_allclose(z[:6],887 [-1.1737132227, -3.2710933028, -4.8307378417,888 -6.1698521283, -7.3767620794, -8.4919488465], rtol=1e-10)889 assert_allclose(zp[:6],890 [-2.2944396826, -4.0731550891, -5.5123957297,891 -6.7812944460, -7.9401786892, -9.0195833588], rtol=1e-10)892class TestAssocLaguerre(object):893 def test_assoc_laguerre(self):894 a1 = special.genlaguerre(11,1)895 a2 = special.assoc_laguerre(.2,11,1)896 assert_array_almost_equal(a2,a1(.2),8)897 a2 = special.assoc_laguerre(1,11,1)898 assert_array_almost_equal(a2,a1(1),8)899class TestBesselpoly(object):900 def test_besselpoly(self):901 pass902class TestKelvin(object):903 def test_bei(self):904 mbei = special.bei(2)905 assert_almost_equal(mbei, 0.9722916273066613,5) # this may not be exact906 def test_beip(self):907 mbeip = special.beip(2)908 assert_almost_equal(mbeip,0.91701361338403631,5) # this may not be exact909 def test_ber(self):910 mber = special.ber(2)911 assert_almost_equal(mber,0.75173418271380821,5) # this may not be exact912 def test_berp(self):913 mberp = special.berp(2)914 assert_almost_equal(mberp,-0.49306712470943909,5) # this may not be exact915 def test_bei_zeros(self):916 # Abramowitz & Stegun, Table 9.12917 bi = special.bei_zeros(5)918 assert_array_almost_equal(bi,array([5.02622,919 9.45541,920 13.89349,921 18.33398,922 22.77544]),4)923 def test_beip_zeros(self):924 bip = special.beip_zeros(5)925 assert_array_almost_equal(bip,array([3.772673304934953,926 8.280987849760042,927 12.742147523633703,928 17.193431752512542,929 21.641143941167325]),8)930 def test_ber_zeros(self):931 ber = special.ber_zeros(5)932 assert_array_almost_equal(ber,array([2.84892,933 7.23883,934 11.67396,935 16.11356,936 20.55463]),4)937 def test_berp_zeros(self):938 brp = special.berp_zeros(5)939 assert_array_almost_equal(brp,array([6.03871,940 10.51364,941 14.96844,942 19.41758,943 23.86430]),4)944 def test_kelvin(self):945 mkelv = special.kelvin(2)946 assert_array_almost_equal(mkelv,(special.ber(2) + special.bei(2)*1j,947 special.ker(2) + special.kei(2)*1j,948 special.berp(2) + special.beip(2)*1j,949 special.kerp(2) + special.keip(2)*1j),8)950 def test_kei(self):951 mkei = special.kei(2)952 assert_almost_equal(mkei,-0.20240006776470432,5)953 def test_keip(self):954 mkeip = special.keip(2)955 assert_almost_equal(mkeip,0.21980790991960536,5)956 def test_ker(self):957 mker = special.ker(2)958 assert_almost_equal(mker,-0.041664513991509472,5)959 def test_kerp(self):960 mkerp = special.kerp(2)961 assert_almost_equal(mkerp,-0.10660096588105264,5)962 def test_kei_zeros(self):963 kei = special.kei_zeros(5)964 assert_array_almost_equal(kei,array([3.91467,965 8.34422,966 12.78256,967 17.22314,968 21.66464]),4)969 def test_keip_zeros(self):970 keip = special.keip_zeros(5)971 assert_array_almost_equal(keip,array([4.93181,972 9.40405,973 13.85827,974 18.30717,975 22.75379]),4)976 # numbers come from 9.9 of A&S pg. 381977 def test_kelvin_zeros(self):978 tmp = special.kelvin_zeros(5)979 berz,beiz,kerz,keiz,berpz,beipz,kerpz,keipz = tmp980 assert_array_almost_equal(berz,array([2.84892,981 7.23883,982 11.67396,983 16.11356,984 20.55463]),4)985 assert_array_almost_equal(beiz,array([5.02622,986 9.45541,987 13.89349,988 18.33398,989 22.77544]),4)990 assert_array_almost_equal(kerz,array([1.71854,991 6.12728,992 10.56294,993 15.00269,994 19.44382]),4)995 assert_array_almost_equal(keiz,array([3.91467,996 8.34422,997 12.78256,998 17.22314,999 21.66464]),4)1000 assert_array_almost_equal(berpz,array([6.03871,1001 10.51364,1002 14.96844,1003 19.41758,1004 23.86430]),4)1005 assert_array_almost_equal(beipz,array([3.77267,1006 # table from 1927 had 3.773201007 # but this is more accurate1008 8.28099,1009 12.74215,1010 17.19343,1011 21.64114]),4)1012 assert_array_almost_equal(kerpz,array([2.66584,1013 7.17212,1014 11.63218,1015 16.08312,1016 20.53068]),4)1017 assert_array_almost_equal(keipz,array([4.93181,1018 9.40405,1019 13.85827,1020 18.30717,1021 22.75379]),4)1022 def test_ker_zeros(self):1023 ker = special.ker_zeros(5)1024 assert_array_almost_equal(ker,array([1.71854,1025 6.12728,1026 10.56294,1027 15.00269,1028 19.44381]),4)1029 def test_kerp_zeros(self):1030 kerp = special.kerp_zeros(5)1031 assert_array_almost_equal(kerp,array([2.66584,1032 7.17212,1033 11.63218,1034 16.08312,1035 20.53068]),4)1036class TestBernoulli(object):1037 def test_bernoulli(self):1038 brn = special.bernoulli(5)1039 assert_array_almost_equal(brn,array([1.0000,1040 -0.5000,1041 0.1667,1042 0.0000,1043 -0.0333,1044 0.0000]),4)1045class TestBeta(object):1046 def test_beta(self):1047 bet = special.beta(2,4)1048 betg = (special.gamma(2)*special.gamma(4))/special.gamma(6)1049 assert_almost_equal(bet,betg,8)1050 def test_betaln(self):1051 betln = special.betaln(2,4)1052 bet = log(abs(special.beta(2,4)))1053 assert_almost_equal(betln,bet,8)1054 def test_betainc(self):1055 btinc = special.betainc(1,1,.2)1056 assert_almost_equal(btinc,0.2,8)1057 def test_betaincinv(self):1058 y = special.betaincinv(2,4,.5)1059 comp = special.betainc(2,4,y)1060 assert_almost_equal(comp,.5,5)1061class TestCombinatorics(object):1062 def test_comb(self):1063 assert_array_almost_equal(special.comb([10, 10], [3, 4]), [120., 210.])1064 assert_almost_equal(special.comb(10, 3), 120.)1065 assert_equal(special.comb(10, 3, exact=True), 120)1066 assert_equal(special.comb(10, 3, exact=True, repetition=True), 220)1067 assert_allclose([special.comb(20, k, exact=True) for k in range(21)],1068 special.comb(20, list(range(21))), atol=1e-15)1069 ii = np.iinfo(int).max + 11070 assert_equal(special.comb(ii, ii-1, exact=True), ii)1071 expected = 1008913445455641933348124972561072 assert_equal(special.comb(100, 50, exact=True), expected)1073 def test_comb_with_np_int64(self):1074 n = 701075 k = 301076 np_n = np.int64(n)1077 np_k = np.int64(k)1078 assert_equal(special.comb(np_n, np_k, exact=True),1079 special.comb(n, k, exact=True))1080 def test_comb_zeros(self):1081 assert_equal(special.comb(2, 3, exact=True), 0)1082 assert_equal(special.comb(-1, 3, exact=True), 0)1083 assert_equal(special.comb(2, -1, exact=True), 0)1084 assert_equal(special.comb(2, -1, exact=False), 0)1085 assert_array_almost_equal(special.comb([2, -1, 2, 10], [3, 3, -1, 3]),1086 [0., 0., 0., 120.])1087 def test_perm(self):1088 assert_array_almost_equal(special.perm([10, 10], [3, 4]), [720., 5040.])1089 assert_almost_equal(special.perm(10, 3), 720.)1090 assert_equal(special.perm(10, 3, exact=True), 720)1091 def test_perm_zeros(self):1092 assert_equal(special.perm(2, 3, exact=True), 0)1093 assert_equal(special.perm(-1, 3, exact=True), 0)1094 assert_equal(special.perm(2, -1, exact=True), 0)1095 assert_equal(special.perm(2, -1, exact=False), 0)1096 assert_array_almost_equal(special.perm([2, -1, 2, 10], [3, 3, -1, 3]),1097 [0., 0., 0., 720.])1098class TestTrigonometric(object):1099 def test_cbrt(self):1100 cb = special.cbrt(27)1101 cbrl = 27**(1.0/3.0)1102 assert_approx_equal(cb,cbrl)1103 def test_cbrtmore(self):1104 cb1 = special.cbrt(27.9)1105 cbrl1 = 27.9**(1.0/3.0)1106 assert_almost_equal(cb1,cbrl1,8)1107 def test_cosdg(self):1108 cdg = special.cosdg(90)1109 cdgrl = cos(pi/2.0)1110 assert_almost_equal(cdg,cdgrl,8)1111 def test_cosdgmore(self):1112 cdgm = special.cosdg(30)1113 cdgmrl = cos(pi/6.0)1114 assert_almost_equal(cdgm,cdgmrl,8)1115 def test_cosm1(self):1116 cs = (special.cosm1(0),special.cosm1(.3),special.cosm1(pi/10))1117 csrl = (cos(0)-1,cos(.3)-1,cos(pi/10)-1)1118 assert_array_almost_equal(cs,csrl,8)1119 def test_cotdg(self):1120 ct = special.cotdg(30)1121 ctrl = tan(pi/6.0)**(-1)1122 assert_almost_equal(ct,ctrl,8)1123 def test_cotdgmore(self):1124 ct1 = special.cotdg(45)1125 ctrl1 = tan(pi/4.0)**(-1)1126 assert_almost_equal(ct1,ctrl1,8)1127 def test_specialpoints(self):1128 assert_almost_equal(special.cotdg(45), 1.0, 14)1129 assert_almost_equal(special.cotdg(-45), -1.0, 14)1130 assert_almost_equal(special.cotdg(90), 0.0, 14)1131 assert_almost_equal(special.cotdg(-90), 0.0, 14)1132 assert_almost_equal(special.cotdg(135), -1.0, 14)1133 assert_almost_equal(special.cotdg(-135), 1.0, 14)1134 assert_almost_equal(special.cotdg(225), 1.0, 14)1135 assert_almost_equal(special.cotdg(-225), -1.0, 14)1136 assert_almost_equal(special.cotdg(270), 0.0, 14)1137 assert_almost_equal(special.cotdg(-270), 0.0, 14)1138 assert_almost_equal(special.cotdg(315), -1.0, 14)1139 assert_almost_equal(special.cotdg(-315), 1.0, 14)1140 assert_almost_equal(special.cotdg(765), 1.0, 14)1141 def test_sinc(self):1142 # the sinc implementation and more extensive sinc tests are in numpy1143 assert_array_equal(special.sinc([0]), 1)1144 assert_equal(special.sinc(0.0), 1.0)1145 def test_sindg(self):1146 sn = special.sindg(90)1147 assert_equal(sn,1.0)1148 def test_sindgmore(self):1149 snm = special.sindg(30)1150 snmrl = sin(pi/6.0)1151 assert_almost_equal(snm,snmrl,8)1152 snm1 = special.sindg(45)1153 snmrl1 = sin(pi/4.0)1154 assert_almost_equal(snm1,snmrl1,8)1155class TestTandg(object):1156 def test_tandg(self):1157 tn = special.tandg(30)1158 tnrl = tan(pi/6.0)1159 assert_almost_equal(tn,tnrl,8)1160 def test_tandgmore(self):1161 tnm = special.tandg(45)1162 tnmrl = tan(pi/4.0)1163 assert_almost_equal(tnm,tnmrl,8)1164 tnm1 = special.tandg(60)1165 tnmrl1 = tan(pi/3.0)1166 assert_almost_equal(tnm1,tnmrl1,8)1167 def test_specialpoints(self):1168 assert_almost_equal(special.tandg(0), 0.0, 14)1169 assert_almost_equal(special.tandg(45), 1.0, 14)1170 assert_almost_equal(special.tandg(-45), -1.0, 14)1171 assert_almost_equal(special.tandg(135), -1.0, 14)1172 assert_almost_equal(special.tandg(-135), 1.0, 14)1173 assert_almost_equal(special.tandg(180), 0.0, 14)1174 assert_almost_equal(special.tandg(-180), 0.0, 14)1175 assert_almost_equal(special.tandg(225), 1.0, 14)1176 assert_almost_equal(special.tandg(-225), -1.0, 14)1177 assert_almost_equal(special.tandg(315), -1.0, 14)1178 assert_almost_equal(special.tandg(-315), 1.0, 14)1179class TestEllip(object):1180 def test_ellipj_nan(self):1181 """Regression test for #912."""1182 special.ellipj(0.5, np.nan)1183 def test_ellipj(self):1184 el = special.ellipj(0.2,0)1185 rel = [sin(0.2),cos(0.2),1.0,0.20]1186 assert_array_almost_equal(el,rel,13)1187 def test_ellipk(self):1188 elk = special.ellipk(.2)1189 assert_almost_equal(elk,1.659623598610528,11)1190 assert_equal(special.ellipkm1(0.0), np.inf)1191 assert_equal(special.ellipkm1(1.0), pi/2)1192 assert_equal(special.ellipkm1(np.inf), 0.0)1193 assert_equal(special.ellipkm1(np.nan), np.nan)1194 assert_equal(special.ellipkm1(-1), np.nan)1195 assert_allclose(special.ellipk(-10), 0.7908718902387385)1196 def test_ellipkinc(self):1197 elkinc = special.ellipkinc(pi/2,.2)1198 elk = special.ellipk(0.2)1199 assert_almost_equal(elkinc,elk,15)1200 alpha = 20*pi/1801201 phi = 45*pi/1801202 m = sin(alpha)**21203 elkinc = special.ellipkinc(phi,m)1204 assert_almost_equal(elkinc,0.79398143,8)1205 # From pg. 614 of A & S1206 assert_equal(special.ellipkinc(pi/2, 0.0), pi/2)1207 assert_equal(special.ellipkinc(pi/2, 1.0), np.inf)1208 assert_equal(special.ellipkinc(pi/2, -np.inf), 0.0)1209 assert_equal(special.ellipkinc(pi/2, np.nan), np.nan)1210 assert_equal(special.ellipkinc(pi/2, 2), np.nan)1211 assert_equal(special.ellipkinc(0, 0.5), 0.0)1212 assert_equal(special.ellipkinc(np.inf, 0.5), np.inf)1213 assert_equal(special.ellipkinc(-np.inf, 0.5), -np.inf)1214 assert_equal(special.ellipkinc(np.inf, np.inf), np.nan)1215 assert_equal(special.ellipkinc(np.inf, -np.inf), np.nan)1216 assert_equal(special.ellipkinc(-np.inf, -np.inf), np.nan)1217 assert_equal(special.ellipkinc(-np.inf, np.inf), np.nan)1218 assert_equal(special.ellipkinc(np.nan, 0.5), np.nan)1219 assert_equal(special.ellipkinc(np.nan, np.nan), np.nan)1220 assert_allclose(special.ellipkinc(0.38974112035318718, 1), 0.4, rtol=1e-14)1221 assert_allclose(special.ellipkinc(1.5707, -10), 0.79084284661724946)1222 def test_ellipkinc_2(self):1223 # Regression test for gh-35501224 # ellipkinc(phi, mbad) was NaN and mvals[2:6] were twice the correct value1225 mbad = 0.683593750000000111226 phi = 0.92729521800161231227 m = np.nextafter(mbad, 0)1228 mvals = []1229 for j in range(10):1230 mvals.append(m)1231 m = np.nextafter(m, 1)1232 f = special.ellipkinc(phi, mvals)1233 assert_array_almost_equal_nulp(f, 1.0259330100195334 * np.ones_like(f), 1)1234 # this bug also appears at phi + n * pi for at least small n1235 f1 = special.ellipkinc(phi + pi, mvals)1236 assert_array_almost_equal_nulp(f1, 5.1296650500976675 * np.ones_like(f1), 2)1237 def test_ellipkinc_singular(self):1238 # ellipkinc(phi, 1) has closed form and is finite only for phi in (-pi/2, pi/2)1239 xlog = np.logspace(-300, -17, 25)1240 xlin = np.linspace(1e-17, 0.1, 25)1241 xlin2 = np.linspace(0.1, pi/2, 25, endpoint=False)1242 assert_allclose(special.ellipkinc(xlog, 1), np.arcsinh(np.tan(xlog)), rtol=1e14)1243 assert_allclose(special.ellipkinc(xlin, 1), np.arcsinh(np.tan(xlin)), rtol=1e14)1244 assert_allclose(special.ellipkinc(xlin2, 1), np.arcsinh(np.tan(xlin2)), rtol=1e14)1245 assert_equal(special.ellipkinc(np.pi/2, 1), np.inf)1246 assert_allclose(special.ellipkinc(-xlog, 1), np.arcsinh(np.tan(-xlog)), rtol=1e14)1247 assert_allclose(special.ellipkinc(-xlin, 1), np.arcsinh(np.tan(-xlin)), rtol=1e14)1248 assert_allclose(special.ellipkinc(-xlin2, 1), np.arcsinh(np.tan(-xlin2)), rtol=1e14)1249 assert_equal(special.ellipkinc(-np.pi/2, 1), np.inf)1250 def test_ellipe(self):1251 ele = special.ellipe(.2)1252 assert_almost_equal(ele,1.4890350580958529,8)1253 assert_equal(special.ellipe(0.0), pi/2)1254 assert_equal(special.ellipe(1.0), 1.0)1255 assert_equal(special.ellipe(-np.inf), np.inf)1256 assert_equal(special.ellipe(np.nan), np.nan)1257 assert_equal(special.ellipe(2), np.nan)1258 assert_allclose(special.ellipe(-10), 3.6391380384177689)1259 def test_ellipeinc(self):1260 eleinc = special.ellipeinc(pi/2,.2)1261 ele = special.ellipe(0.2)1262 assert_almost_equal(eleinc,ele,14)1263 # pg 617 of A & S1264 alpha, phi = 52*pi/180,35*pi/1801265 m = sin(alpha)**21266 eleinc = special.ellipeinc(phi,m)1267 assert_almost_equal(eleinc, 0.58823065, 8)1268 assert_equal(special.ellipeinc(pi/2, 0.0), pi/2)1269 assert_equal(special.ellipeinc(pi/2, 1.0), 1.0)1270 assert_equal(special.ellipeinc(pi/2, -np.inf), np.inf)1271 assert_equal(special.ellipeinc(pi/2, np.nan), np.nan)1272 assert_equal(special.ellipeinc(pi/2, 2), np.nan)1273 assert_equal(special.ellipeinc(0, 0.5), 0.0)1274 assert_equal(special.ellipeinc(np.inf, 0.5), np.inf)1275 assert_equal(special.ellipeinc(-np.inf, 0.5), -np.inf)1276 assert_equal(special.ellipeinc(np.inf, -np.inf), np.inf)1277 assert_equal(special.ellipeinc(-np.inf, -np.inf), -np.inf)1278 assert_equal(special.ellipeinc(np.inf, np.inf), np.nan)1279 assert_equal(special.ellipeinc(-np.inf, np.inf), np.nan)1280 assert_equal(special.ellipeinc(np.nan, 0.5), np.nan)1281 assert_equal(special.ellipeinc(np.nan, np.nan), np.nan)1282 assert_allclose(special.ellipeinc(1.5707, -10), 3.6388185585822876)1283 def test_ellipeinc_2(self):1284 # Regression test for gh-35501285 # ellipeinc(phi, mbad) was NaN and mvals[2:6] were twice the correct value1286 mbad = 0.683593750000000111287 phi = 0.92729521800161231288 m = np.nextafter(mbad, 0)1289 mvals = []1290 for j in range(10):1291 mvals.append(m)1292 m = np.nextafter(m, 1)1293 f = special.ellipeinc(phi, mvals)1294 assert_array_almost_equal_nulp(f, 0.84442884574781019 * np.ones_like(f), 2)1295 # this bug also appears at phi + n * pi for at least small n1296 f1 = special.ellipeinc(phi + pi, mvals)1297 assert_array_almost_equal_nulp(f1, 3.3471442287390509 * np.ones_like(f1), 4)1298class TestErf(object):1299 def test_erf(self):1300 er = special.erf(.25)1301 assert_almost_equal(er,0.2763263902,8)1302 def test_erf_zeros(self):1303 erz = special.erf_zeros(5)1304 erzr = array([1.45061616+1.88094300j,1305 2.24465928+2.61657514j,1306 2.83974105+3.17562810j,1307 3.33546074+3.64617438j,1308 3.76900557+4.06069723j])1309 assert_array_almost_equal(erz,erzr,4)1310 def _check_variant_func(self, func, other_func, rtol, atol=0):1311 np.random.seed(1234)1312 n = 100001313 x = np.random.pareto(0.02, n) * (2*np.random.randint(0, 2, n) - 1)1314 y = np.random.pareto(0.02, n) * (2*np.random.randint(0, 2, n) - 1)1315 z = x + 1j*y1316 old_errors = np.seterr(all='ignore')1317 try:1318 w = other_func(z)1319 w_real = other_func(x).real1320 mask = np.isfinite(w)1321 w = w[mask]1322 z = z[mask]1323 mask = np.isfinite(w_real)1324 w_real = w_real[mask]1325 x = x[mask]1326 # test both real and complex variants1327 assert_func_equal(func, w, z, rtol=rtol, atol=atol)1328 assert_func_equal(func, w_real, x, rtol=rtol, atol=atol)1329 finally:1330 np.seterr(**old_errors)1331 def test_erfc_consistent(self):1332 self._check_variant_func(1333 cephes.erfc,1334 lambda z: 1 - cephes.erf(z),1335 rtol=1e-12,1336 atol=1e-14 # <- the test function loses precision1337 )1338 def test_erfcx_consistent(self):1339 self._check_variant_func(1340 cephes.erfcx,1341 lambda z: np.exp(z*z) * cephes.erfc(z),1342 rtol=1e-121343 )1344 def test_erfi_consistent(self):1345 self._check_variant_func(1346 cephes.erfi,1347 lambda z: -1j * cephes.erf(1j*z),1348 rtol=1e-121349 )1350 def test_dawsn_consistent(self):1351 self._check_variant_func(1352 cephes.dawsn,1353 lambda z: sqrt(pi)/2 * np.exp(-z*z) * cephes.erfi(z),1354 rtol=1e-121355 )1356 def test_erfcinv(self):1357 i = special.erfcinv(1)1358 # Use assert_array_equal instead of assert_equal, so the comparison1359 # of -0.0 and 0.0 doesn't fail.1360 assert_array_equal(i, 0)1361 def test_erfinv(self):1362 i = special.erfinv(0)1363 assert_equal(i,0)1364 def test_erf_nan_inf(self):1365 vals = [np.nan, -np.inf, np.inf]1366 expected = [np.nan, -1, 1]1367 assert_allclose(special.erf(vals), expected, rtol=1e-15)1368 def test_erfc_nan_inf(self):1369 vals = [np.nan, -np.inf, np.inf]1370 expected = [np.nan, 2, 0]1371 assert_allclose(special.erfc(vals), expected, rtol=1e-15)1372 def test_erfcx_nan_inf(self):1373 vals = [np.nan, -np.inf, np.inf]1374 expected = [np.nan, np.inf, 0]1375 assert_allclose(special.erfcx(vals), expected, rtol=1e-15)1376 def test_erfi_nan_inf(self):1377 vals = [np.nan, -np.inf, np.inf]1378 expected = [np.nan, -np.inf, np.inf]1379 assert_allclose(special.erfi(vals), expected, rtol=1e-15)1380 def test_dawsn_nan_inf(self):1381 vals = [np.nan, -np.inf, np.inf]1382 expected = [np.nan, -0.0, 0.0]1383 assert_allclose(special.dawsn(vals), expected, rtol=1e-15)1384 def test_wofz_nan_inf(self):1385 vals = [np.nan, -np.inf, np.inf]1386 expected = [np.nan + np.nan * 1.j, 0.-0.j, 0.+0.j]1387 assert_allclose(special.wofz(vals), expected, rtol=1e-15)1388class TestEuler(object):1389 def test_euler(self):1390 eu0 = special.euler(0)1391 eu1 = special.euler(1)1392 eu2 = special.euler(2) # just checking segfaults1393 assert_allclose(eu0, [1], rtol=1e-15)1394 assert_allclose(eu1, [1, 0], rtol=1e-15)1395 assert_allclose(eu2, [1, 0, -1], rtol=1e-15)1396 eu24 = special.euler(24)1397 mathworld = [1,1,5,61,1385,50521,2702765,199360981,1398 19391512145,2404879675441,1399 370371188237525,69348874393137901,1400 15514534163557086905]1401 correct = zeros((25,),'d')1402 for k in range(0,13):1403 if (k % 2):1404 correct[2*k] = -float(mathworld[k])1405 else:1406 correct[2*k] = float(mathworld[k])1407 olderr = np.seterr(all='ignore')1408 try:1409 err = nan_to_num((eu24-correct)/correct)1410 errmax = max(err)1411 finally:1412 np.seterr(**olderr)1413 assert_almost_equal(errmax, 0.0, 14)1414class TestExp(object):1415 def test_exp2(self):1416 ex = special.exp2(2)1417 exrl = 2**21418 assert_equal(ex,exrl)1419 def test_exp2more(self):1420 exm = special.exp2(2.5)1421 exmrl = 2**(2.5)1422 assert_almost_equal(exm,exmrl,8)1423 def test_exp10(self):1424 ex = special.exp10(2)1425 exrl = 10**21426 assert_approx_equal(ex,exrl)1427 def test_exp10more(self):1428 exm = special.exp10(2.5)1429 exmrl = 10**(2.5)1430 assert_almost_equal(exm,exmrl,8)1431 def test_expm1(self):1432 ex = (special.expm1(2),special.expm1(3),special.expm1(4))1433 exrl = (exp(2)-1,exp(3)-1,exp(4)-1)1434 assert_array_almost_equal(ex,exrl,8)1435 def test_expm1more(self):1436 ex1 = (special.expm1(2),special.expm1(2.1),special.expm1(2.2))1437 exrl1 = (exp(2)-1,exp(2.1)-1,exp(2.2)-1)1438 assert_array_almost_equal(ex1,exrl1,8)1439class TestFactorialFunctions(object):1440 def test_factorial(self):1441 # Some known values, float math1442 assert_array_almost_equal(special.factorial(0), 1)1443 assert_array_almost_equal(special.factorial(1), 1)1444 assert_array_almost_equal(special.factorial(2), 2)1445 assert_array_almost_equal([6., 24., 120.],1446 special.factorial([3, 4, 5], exact=False))1447 assert_array_almost_equal(special.factorial([[5, 3], [4, 3]]),1448 [[120, 6], [24, 6]])1449 # Some known values, integer math1450 assert_equal(special.factorial(0, exact=True), 1)1451 assert_equal(special.factorial(1, exact=True), 1)1452 assert_equal(special.factorial(2, exact=True), 2)1453 assert_equal(special.factorial(5, exact=True), 120)1454 assert_equal(special.factorial(15, exact=True), 1307674368000)1455 # ndarray shape is maintained1456 assert_equal(special.factorial([7, 4, 15, 10], exact=True),1457 [5040, 24, 1307674368000, 3628800])1458 assert_equal(special.factorial([[5, 3], [4, 3]], True),1459 [[120, 6], [24, 6]])1460 # object arrays1461 assert_equal(special.factorial(np.arange(-3, 22), True),1462 special.factorial(np.arange(-3, 22), False))1463 # int64 array1464 assert_equal(special.factorial(np.arange(-3, 15), True),1465 special.factorial(np.arange(-3, 15), False))1466 # int32 array1467 assert_equal(special.factorial(np.arange(-3, 5), True),1468 special.factorial(np.arange(-3, 5), False))1469 # Consistent output for n < 01470 for exact in (True, False):1471 assert_array_equal(0, special.factorial(-3, exact))1472 assert_array_equal([1, 2, 0, 0],1473 special.factorial([1, 2, -5, -4], exact))1474 for n in range(0, 22):1475 # Compare all with math.factorial1476 correct = math.factorial(n)1477 assert_array_equal(correct, special.factorial(n, True))1478 assert_array_equal(correct, special.factorial([n], True)[0])1479 assert_allclose(float(correct), special.factorial(n, False))1480 assert_allclose(float(correct), special.factorial([n], False)[0])1481 # Compare exact=True vs False, scalar vs array1482 assert_array_equal(special.factorial(n, True),1483 special.factorial(n, False))1484 assert_array_equal(special.factorial([n], True),1485 special.factorial([n], False))1486 def test_factorial2(self):1487 assert_array_almost_equal([105., 384., 945.],1488 special.factorial2([7, 8, 9], exact=False))1489 assert_equal(special.factorial2(7, exact=True), 105)1490 def test_factorialk(self):1491 assert_equal(special.factorialk(5, 1, exact=True), 120)1492 assert_equal(special.factorialk(5, 3, exact=True), 10)1493class TestFresnel(object):1494 def test_fresnel(self):1495 frs = array(special.fresnel(.5))1496 assert_array_almost_equal(frs,array([0.064732432859999287, 0.49234422587144644]),8)1497 def test_fresnel_inf1(self):1498 frs = special.fresnel(np.inf)1499 assert_equal(frs, (0.5, 0.5))1500 def test_fresnel_inf2(self):1501 frs = special.fresnel(-np.inf)1502 assert_equal(frs, (-0.5, -0.5))1503 # values from pg 329 Table 7.11 of A & S1504 # slightly corrected in 4th decimal place1505 def test_fresnel_zeros(self):1506 szo, czo = special.fresnel_zeros(5)1507 assert_array_almost_equal(szo,1508 array([2.0093+0.2885j,1509 2.8335+0.2443j,1510 3.4675+0.2185j,1511 4.0026+0.2009j,1512 4.4742+0.1877j]),3)1513 assert_array_almost_equal(czo,1514 array([1.7437+0.3057j,1515 2.6515+0.2529j,1516 3.3204+0.2240j,1517 3.8757+0.2047j,1518 4.3611+0.1907j]),3)1519 vals1 = special.fresnel(szo)[0]1520 vals2 = special.fresnel(czo)[1]1521 assert_array_almost_equal(vals1,0,14)1522 assert_array_almost_equal(vals2,0,14)1523 def test_fresnelc_zeros(self):1524 szo, czo = special.fresnel_zeros(6)1525 frc = special.fresnelc_zeros(6)1526 assert_array_almost_equal(frc,czo,12)1527 def test_fresnels_zeros(self):1528 szo, czo = special.fresnel_zeros(5)1529 frs = special.fresnels_zeros(5)1530 assert_array_almost_equal(frs,szo,12)1531class TestGamma(object):1532 def test_gamma(self):1533 gam = special.gamma(5)1534 assert_equal(gam,24.0)1535 def test_gammaln(self):1536 gamln = special.gammaln(3)1537 lngam = log(special.gamma(3))1538 assert_almost_equal(gamln,lngam,8)1539 def test_gammainc(self):1540 gama = special.gammainc(.5,.5)1541 assert_almost_equal(gama,.7,1)1542 def test_gammaincnan(self):1543 gama = special.gammainc(-1,1)1544 assert_(isnan(gama))1545 def test_gammainczero(self):1546 # bad arg but zero integration limit1547 gama = special.gammainc(-1,0)1548 assert_equal(gama,0.0)1549 def test_gammaincinf(self):1550 gama = special.gammainc(0.5, np.inf)1551 assert_equal(gama,1.0)1552 def test_gammaincc(self):1553 gicc = special.gammaincc(.5,.5)1554 greal = 1 - special.gammainc(.5,.5)1555 assert_almost_equal(gicc,greal,8)1556 def test_gammainccnan(self):1557 gama = special.gammaincc(-1,1)1558 assert_(isnan(gama))1559 def test_gammainccinf(self):1560 gama = special.gammaincc(0.5,np.inf)1561 assert_equal(gama,0.0)1562 def test_gammainccinv(self):1563 gccinv = special.gammainccinv(.5,.5)1564 gcinv = special.gammaincinv(.5,.5)1565 assert_almost_equal(gccinv,gcinv,8)1566 @with_special_errors1567 def test_gammaincinv(self):1568 y = special.gammaincinv(.4,.4)1569 x = special.gammainc(.4,y)1570 assert_almost_equal(x,0.4,1)1571 y = special.gammainc(10, 0.05)1572 x = special.gammaincinv(10, 2.5715803516000736e-20)1573 assert_almost_equal(0.05, x, decimal=10)1574 assert_almost_equal(y, 2.5715803516000736e-20, decimal=10)1575 x = special.gammaincinv(50, 8.20754777388471303050299243573393e-18)1576 assert_almost_equal(11.0, x, decimal=10)1577 @with_special_errors1578 def test_975(self):1579 # Regression test for ticket #975 -- switch point in algorithm1580 # check that things work OK at the point, immediately next floats1581 # around it, and a bit further away1582 pts = [0.25,1583 np.nextafter(0.25, 0), 0.25 - 1e-12,1584 np.nextafter(0.25, 1), 0.25 + 1e-12]1585 for xp in pts:1586 y = special.gammaincinv(.4, xp)1587 x = special.gammainc(0.4, y)1588 assert_allclose(x, xp, rtol=1e-12)1589 def test_rgamma(self):1590 rgam = special.rgamma(8)1591 rlgam = 1/special.gamma(8)1592 assert_almost_equal(rgam,rlgam,8)1593 def test_infinity(self):1594 assert_(np.isinf(special.gamma(-1)))1595 assert_equal(special.rgamma(-1), 0)1596class TestHankel(object):1597 def test_negv1(self):1598 assert_almost_equal(special.hankel1(-3,2), -special.hankel1(3,2), 14)1599 def test_hankel1(self):1600 hank1 = special.hankel1(1,.1)1601 hankrl = (special.jv(1,.1) + special.yv(1,.1)*1j)1602 assert_almost_equal(hank1,hankrl,8)1603 def test_negv1e(self):1604 assert_almost_equal(special.hankel1e(-3,2), -special.hankel1e(3,2), 14)1605 def test_hankel1e(self):1606 hank1e = special.hankel1e(1,.1)1607 hankrle = special.hankel1(1,.1)*exp(-.1j)1608 assert_almost_equal(hank1e,hankrle,8)1609 def test_negv2(self):1610 assert_almost_equal(special.hankel2(-3,2), -special.hankel2(3,2), 14)1611 def test_hankel2(self):1612 hank2 = special.hankel2(1,.1)1613 hankrl2 = (special.jv(1,.1) - special.yv(1,.1)*1j)1614 assert_almost_equal(hank2,hankrl2,8)1615 def test_neg2e(self):1616 assert_almost_equal(special.hankel2e(-3,2), -special.hankel2e(3,2), 14)1617 def test_hankl2e(self):1618 hank2e = special.hankel2e(1,.1)1619 hankrl2e = special.hankel2e(1,.1)1620 assert_almost_equal(hank2e,hankrl2e,8)1621class TestHyper(object):1622 def test_h1vp(self):1623 h1 = special.h1vp(1,.1)1624 h1real = (special.jvp(1,.1) + special.yvp(1,.1)*1j)1625 assert_almost_equal(h1,h1real,8)1626 def test_h2vp(self):1627 h2 = special.h2vp(1,.1)1628 h2real = (special.jvp(1,.1) - special.yvp(1,.1)*1j)1629 assert_almost_equal(h2,h2real,8)1630 def test_hyp0f1(self):1631 # scalar input1632 assert_allclose(special.hyp0f1(2.5, 0.5), 1.21482702689997, rtol=1e-12)1633 assert_allclose(special.hyp0f1(2.5, 0), 1.0, rtol=1e-15)1634 # float input, expected values match mpmath1635 x = special.hyp0f1(3.0, [-1.5, -1, 0, 1, 1.5])1636 expected = np.array([0.58493659229143, 0.70566805723127, 1.0,1637 1.37789689539747, 1.60373685288480])1638 assert_allclose(x, expected, rtol=1e-12)1639 # complex input1640 x = special.hyp0f1(3.0, np.array([-1.5, -1, 0, 1, 1.5]) + 0.j)1641 assert_allclose(x, expected.astype(complex), rtol=1e-12)1642 # test broadcasting1643 x1 = [0.5, 1.5, 2.5]1644 x2 = [0, 1, 0.5]1645 x = special.hyp0f1(x1, x2)1646 expected = [1.0, 1.8134302039235093, 1.21482702689997]1647 assert_allclose(x, expected, rtol=1e-12)1648 x = special.hyp0f1(np.row_stack([x1] * 2), x2)1649 assert_allclose(x, np.row_stack([expected] * 2), rtol=1e-12)1650 assert_raises(ValueError, special.hyp0f1,1651 np.row_stack([x1] * 3), [0, 1])1652 def test_hyp0f1_gh5764(self):1653 # Just checks the point that failed; there's a more systematic1654 # test in test_mpmath1655 res = special.hyp0f1(0.8, 0.5 + 0.5*1J)1656 # The expected value was generated using mpmath1657 assert_almost_equal(res, 1.6139719776441115 + 1J*0.80893054061790665)1658 def test_hyp1f1(self):1659 hyp1 = special.hyp1f1(.1,.1,.3)1660 assert_almost_equal(hyp1, 1.3498588075760032,7)1661 # test contributed by Moritz Deger (2008-05-29)1662 # https://github.com/scipy/scipy/issues/1186 (Trac #659)1663 # reference data obtained from mathematica [ a, b, x, m(a,b,x)]:1664 # produced with test_hyp1f1.nb1665 ref_data = array([[-8.38132975e+00, -1.28436461e+01, -2.91081397e+01, 1.04178330e+04],1666 [2.91076882e+00, -6.35234333e+00, -1.27083993e+01, 6.68132725e+00],1667 [-1.42938258e+01, 1.80869131e-01, 1.90038728e+01, 1.01385897e+05],1668 [5.84069088e+00, 1.33187908e+01, 2.91290106e+01, 1.59469411e+08],1669 [-2.70433202e+01, -1.16274873e+01, -2.89582384e+01, 1.39900152e+24],1670 [4.26344966e+00, -2.32701773e+01, 1.91635759e+01, 6.13816915e+21],1671 [1.20514340e+01, -3.40260240e+00, 7.26832235e+00, 1.17696112e+13],1672 [2.77372955e+01, -1.99424687e+00, 3.61332246e+00, 3.07419615e+13],1673 [1.50310939e+01, -2.91198675e+01, -1.53581080e+01, -3.79166033e+02],1674 [1.43995827e+01, 9.84311196e+00, 1.93204553e+01, 2.55836264e+10],1675 [-4.08759686e+00, 1.34437025e+01, -1.42072843e+01, 1.70778449e+01],1676 [8.05595738e+00, -1.31019838e+01, 1.52180721e+01, 3.06233294e+21],1677 [1.81815804e+01, -1.42908793e+01, 9.57868793e+00, -2.84771348e+20],1678 [-2.49671396e+01, 1.25082843e+01, -1.71562286e+01, 2.36290426e+07],1679 [2.67277673e+01, 1.70315414e+01, 6.12701450e+00, 7.77917232e+03],1680 [2.49565476e+01, 2.91694684e+01, 6.29622660e+00, 2.35300027e+02],1681 [6.11924542e+00, -1.59943768e+00, 9.57009289e+00, 1.32906326e+11],1682 [-1.47863653e+01, 2.41691301e+01, -1.89981821e+01, 2.73064953e+03],1683 [2.24070483e+01, -2.93647433e+00, 8.19281432e+00, -6.42000372e+17],1684 [8.04042600e-01, 1.82710085e+01, -1.97814534e+01, 5.48372441e-01],1685 [1.39590390e+01, 1.97318686e+01, 2.37606635e+00, 5.51923681e+00],1686 [-4.66640483e+00, -2.00237930e+01, 7.40365095e+00, 4.50310752e+00],1687 [2.76821999e+01, -6.36563968e+00, 1.11533984e+01, -9.28725179e+23],1688 [-2.56764457e+01, 1.24544906e+00, 1.06407572e+01, 1.25922076e+01],1689 [3.20447808e+00, 1.30874383e+01, 2.26098014e+01, 2.03202059e+04],1690 [-1.24809647e+01, 4.15137113e+00, -2.92265700e+01, 2.39621411e+08],1691 [2.14778108e+01, -2.35162960e+00, -1.13758664e+01, 4.46882152e-01],1692 [-9.85469168e+00, -3.28157680e+00, 1.67447548e+01, -1.07342390e+07],1693 [1.08122310e+01, -2.47353236e+01, -1.15622349e+01, -2.91733796e+03],1694 [-2.67933347e+01, -3.39100709e+00, 2.56006986e+01, -5.29275382e+09],1695 [-8.60066776e+00, -8.02200924e+00, 1.07231926e+01, 1.33548320e+06],1696 [-1.01724238e-01, -1.18479709e+01, -2.55407104e+01, 1.55436570e+00],1697 [-3.93356771e+00, 2.11106818e+01, -2.57598485e+01, 2.13467840e+01],1698 [3.74750503e+00, 1.55687633e+01, -2.92841720e+01, 1.43873509e-02],1699 [6.99726781e+00, 2.69855571e+01, -1.63707771e+01, 3.08098673e-02],1700 [-2.31996011e+01, 3.47631054e+00, 9.75119815e-01, 1.79971073e-02],1701 [2.38951044e+01, -2.91460190e+01, -2.50774708e+00, 9.56934814e+00],1702 [1.52730825e+01, 5.77062507e+00, 1.21922003e+01, 1.32345307e+09],1703 [1.74673917e+01, 1.89723426e+01, 4.94903250e+00, 9.90859484e+01],1704 [1.88971241e+01, 2.86255413e+01, 5.52360109e-01, 1.44165360e+00],1705 [1.02002319e+01, -1.66855152e+01, -2.55426235e+01, 6.56481554e+02],1706 [-1.79474153e+01, 1.22210200e+01, -1.84058212e+01, 8.24041812e+05],1707 [-1.36147103e+01, 1.32365492e+00, -7.22375200e+00, 9.92446491e+05],1708 [7.57407832e+00, 2.59738234e+01, -1.34139168e+01, 3.64037761e-02],1709 [2.21110169e+00, 1.28012666e+01, 1.62529102e+01, 1.33433085e+02],1710 [-2.64297569e+01, -1.63176658e+01, -1.11642006e+01, -2.44797251e+13],1711 [-2.46622944e+01, -3.02147372e+00, 8.29159315e+00, -3.21799070e+05],1712 [-1.37215095e+01, -1.96680183e+01, 2.91940118e+01, 3.21457520e+12],1713 [-5.45566105e+00, 2.81292086e+01, 1.72548215e-01, 9.66973000e-01],1714 [-1.55751298e+00, -8.65703373e+00, 2.68622026e+01, -3.17190834e+16],1715 [2.45393609e+01, -2.70571903e+01, 1.96815505e+01, 1.80708004e+37],1716 [5.77482829e+00, 1.53203143e+01, 2.50534322e+01, 1.14304242e+06],1717 [-1.02626819e+01, 2.36887658e+01, -2.32152102e+01, 7.28965646e+02],1718 [-1.30833446e+00, -1.28310210e+01, 1.87275544e+01, -9.33487904e+12],1719 [5.83024676e+00, -1.49279672e+01, 2.44957538e+01, -7.61083070e+27],1720 [-2.03130747e+01, 2.59641715e+01, -2.06174328e+01, 4.54744859e+04],1721 [1.97684551e+01, -2.21410519e+01, -2.26728740e+01, 3.53113026e+06],1722 [2.73673444e+01, 2.64491725e+01, 1.57599882e+01, 1.07385118e+07],1723 [5.73287971e+00, 1.21111904e+01, 1.33080171e+01, 2.63220467e+03],1724 [-2.82751072e+01, 2.08605881e+01, 9.09838900e+00, -6.60957033e-07],1725 [1.87270691e+01, -1.74437016e+01, 1.52413599e+01, 6.59572851e+27],1726 [6.60681457e+00, -2.69449855e+00, 9.78972047e+00, -2.38587870e+12],1727 [1.20895561e+01, -2.51355765e+01, 2.30096101e+01, 7.58739886e+32],1728 [-2.44682278e+01, 2.10673441e+01, -1.36705538e+01, 4.54213550e+04],1729 [-4.50665152e+00, 3.72292059e+00, -4.83403707e+00, 2.68938214e+01],1730 [-7.46540049e+00, -1.08422222e+01, -1.72203805e+01, -2.09402162e+02],1731 [-2.00307551e+01, -7.50604431e+00, -2.78640020e+01, 4.15985444e+19],1732 [1.99890876e+01, 2.20677419e+01, -2.51301778e+01, 1.23840297e-09],1733 [2.03183823e+01, -7.66942559e+00, 2.10340070e+01, 1.46285095e+31],1734 [-2.90315825e+00, -2.55785967e+01, -9.58779316e+00, 2.65714264e-01],1735 [2.73960829e+01, -1.80097203e+01, -2.03070131e+00, 2.52908999e+02],1736 [-2.11708058e+01, -2.70304032e+01, 2.48257944e+01, 3.09027527e+08],1737 [2.21959758e+01, 4.00258675e+00, -1.62853977e+01, -9.16280090e-09],1738 [1.61661840e+01, -2.26845150e+01, 2.17226940e+01, -8.24774394e+33],1739 [-3.35030306e+00, 1.32670581e+00, 9.39711214e+00, -1.47303163e+01],1740 [7.23720726e+00, -2.29763909e+01, 2.34709682e+01, -9.20711735e+29],1741 [2.71013568e+01, 1.61951087e+01, -7.11388906e-01, 2.98750911e-01],1742 [8.40057933e+00, -7.49665220e+00, 2.95587388e+01, 6.59465635e+29],1743 [-1.51603423e+01, 1.94032322e+01, -7.60044357e+00, 1.05186941e+02],1744 [-8.83788031e+00, -2.72018313e+01, 1.88269907e+00, 1.81687019e+00],1745 [-1.87283712e+01, 5.87479570e+00, -1.91210203e+01, 2.52235612e+08],1746 [-5.61338513e-01, 2.69490237e+01, 1.16660111e-01, 9.97567783e-01],1747 [-5.44354025e+00, -1.26721408e+01, -4.66831036e+00, 1.06660735e-01],1748 [-2.18846497e+00, 2.33299566e+01, 9.62564397e+00, 3.03842061e-01],1749 [6.65661299e+00, -2.39048713e+01, 1.04191807e+01, 4.73700451e+13],1750 [-2.57298921e+01, -2.60811296e+01, 2.74398110e+01, -5.32566307e+11],1751 [-1.11431826e+01, -1.59420160e+01, -1.84880553e+01, -1.01514747e+02],1752 [6.50301931e+00, 2.59859051e+01, -2.33270137e+01, 1.22760500e-02],1753 [-1.94987891e+01, -2.62123262e+01, 3.90323225e+00, 1.71658894e+01],1754 [7.26164601e+00, -1.41469402e+01, 2.81499763e+01, -2.50068329e+31],1755 [-1.52424040e+01, 2.99719005e+01, -2.85753678e+01, 1.31906693e+04],1756 [5.24149291e+00, -1.72807223e+01, 2.22129493e+01, 2.50748475e+25],1757 [3.63207230e-01, -9.54120862e-02, -2.83874044e+01, 9.43854939e-01],1758 [-2.11326457e+00, -1.25707023e+01, 1.17172130e+00, 1.20812698e+00],1759 [2.48513582e+00, 1.03652647e+01, -1.84625148e+01, 6.47910997e-02],1760 [2.65395942e+01, 2.74794672e+01, 1.29413428e+01, 2.89306132e+05],1761 [-9.49445460e+00, 1.59930921e+01, -1.49596331e+01, 3.27574841e+02],1762 [-5.89173945e+00, 9.96742426e+00, 2.60318889e+01, -3.15842908e-01],1763 [-1.15387239e+01, -2.21433107e+01, -2.17686413e+01, 1.56724718e-01],1764 [-5.30592244e+00, -2.42752190e+01, 1.29734035e+00, 1.31985534e+00]])1765 for a,b,c,expected in ref_data:1766 result = special.hyp1f1(a,b,c)1767 assert_(abs(expected - result)/expected < 1e-4)1768 def test_hyp1f1_gh2957(self):1769 hyp1 = special.hyp1f1(0.5, 1.5, -709.7827128933)1770 hyp2 = special.hyp1f1(0.5, 1.5, -709.7827128934)1771 assert_almost_equal(hyp1, hyp2, 12)1772 def test_hyp1f1_gh2282(self):1773 hyp = special.hyp1f1(0.5, 1.5, -1000)1774 assert_almost_equal(hyp, 0.028024956081989643, 12)1775 def test_hyp2f1(self):1776 # a collection of special cases taken from AMS 551777 values = [[0.5, 1, 1.5, 0.2**2, 0.5/0.2*log((1+0.2)/(1-0.2))],1778 [0.5, 1, 1.5, -0.2**2, 1./0.2*arctan(0.2)],1779 [1, 1, 2, 0.2, -1/0.2*log(1-0.2)],1780 [3, 3.5, 1.5, 0.2**2,1781 0.5/0.2/(-5)*((1+0.2)**(-5)-(1-0.2)**(-5))],1782 [-3, 3, 0.5, sin(0.2)**2, cos(2*3*0.2)],1783 [3, 4, 8, 1, special.gamma(8)*special.gamma(8-4-3)/special.gamma(8-3)/special.gamma(8-4)],1784 [3, 2, 3-2+1, -1, 1./2**3*sqrt(pi) *1785 special.gamma(1+3-2)/special.gamma(1+0.5*3-2)/special.gamma(0.5+0.5*3)],1786 [5, 2, 5-2+1, -1, 1./2**5*sqrt(pi) *1787 special.gamma(1+5-2)/special.gamma(1+0.5*5-2)/special.gamma(0.5+0.5*5)],1788 [4, 0.5+4, 1.5-2*4, -1./3, (8./9)**(-2*4)*special.gamma(4./3) *1789 special.gamma(1.5-2*4)/special.gamma(3./2)/special.gamma(4./3-2*4)],1790 # and some others1791 # ticket #4241792 [1.5, -0.5, 1.0, -10.0, 4.1300097765277476484],1793 # negative integer a or b, with c-a-b integer and x > 0.91794 [-2,3,1,0.95,0.715],1795 [2,-3,1,0.95,-0.007],1796 [-6,3,1,0.95,0.0000810625],1797 [2,-5,1,0.95,-0.000029375],1798 # huge negative integers1799 (10, -900, 10.5, 0.99, 1.91853705796607664803709475658e-24),1800 (10, -900, -10.5, 0.99, 3.54279200040355710199058559155e-18),1801 ]1802 for i, (a, b, c, x, v) in enumerate(values):1803 cv = special.hyp2f1(a, b, c, x)1804 assert_almost_equal(cv, v, 8, err_msg='test #%d' % i)1805 def test_hyperu(self):1806 val1 = special.hyperu(1,0.1,100)1807 assert_almost_equal(val1,0.0098153,7)1808 a,b = [0.3,0.6,1.2,-2.7],[1.5,3.2,-0.4,-3.2]1809 a,b = asarray(a), asarray(b)1810 z = 0.51811 hypu = special.hyperu(a,b,z)1812 hprl = (pi/sin(pi*b))*(special.hyp1f1(a,b,z) /1813 (special.gamma(1+a-b)*special.gamma(b)) -1814 z**(1-b)*special.hyp1f1(1+a-b,2-b,z)1815 / (special.gamma(a)*special.gamma(2-b)))1816 assert_array_almost_equal(hypu,hprl,12)1817 def test_hyperu_gh2287(self):1818 assert_almost_equal(special.hyperu(1, 1.5, 20.2),1819 0.048360918656699191, 12)1820class TestBessel(object):1821 def test_itj0y0(self):1822 it0 = array(special.itj0y0(.2))1823 assert_array_almost_equal(it0,array([0.19933433254006822, -0.34570883800412566]),8)1824 def test_it2j0y0(self):1825 it2 = array(special.it2j0y0(.2))1826 assert_array_almost_equal(it2,array([0.0049937546274601858, -0.43423067011231614]),8)1827 def test_negv_iv(self):1828 assert_equal(special.iv(3,2), special.iv(-3,2))1829 def test_j0(self):1830 oz = special.j0(.1)1831 ozr = special.jn(0,.1)1832 assert_almost_equal(oz,ozr,8)1833 def test_j1(self):1834 o1 = special.j1(.1)1835 o1r = special.jn(1,.1)1836 assert_almost_equal(o1,o1r,8)1837 def test_jn(self):1838 jnnr = special.jn(1,.2)1839 assert_almost_equal(jnnr,0.099500832639235995,8)1840 def test_negv_jv(self):1841 assert_almost_equal(special.jv(-3,2), -special.jv(3,2), 14)1842 def test_jv(self):1843 values = [[0, 0.1, 0.99750156206604002],1844 [2./3, 1e-8, 0.3239028506761532e-5],1845 [2./3, 1e-10, 0.1503423854873779e-6],1846 [3.1, 1e-10, 0.1711956265409013e-32],1847 [2./3, 4.0, -0.2325440850267039],1848 ]1849 for i, (v, x, y) in enumerate(values):1850 yc = special.jv(v, x)1851 assert_almost_equal(yc, y, 8, err_msg='test #%d' % i)1852 def test_negv_jve(self):1853 assert_almost_equal(special.jve(-3,2), -special.jve(3,2), 14)1854 def test_jve(self):1855 jvexp = special.jve(1,.2)1856 assert_almost_equal(jvexp,0.099500832639235995,8)1857 jvexp1 = special.jve(1,.2+1j)1858 z = .2+1j1859 jvexpr = special.jv(1,z)*exp(-abs(z.imag))1860 assert_almost_equal(jvexp1,jvexpr,8)1861 def test_jn_zeros(self):1862 jn0 = special.jn_zeros(0,5)1863 jn1 = special.jn_zeros(1,5)1864 assert_array_almost_equal(jn0,array([2.4048255577,1865 5.5200781103,1866 8.6537279129,1867 11.7915344391,1868 14.9309177086]),4)1869 assert_array_almost_equal(jn1,array([3.83171,1870 7.01559,1871 10.17347,1872 13.32369,1873 16.47063]),4)1874 jn102 = special.jn_zeros(102,5)1875 assert_allclose(jn102, array([110.89174935992040343,1876 117.83464175788308398,1877 123.70194191713507279,1878 129.02417238949092824,1879 134.00114761868422559]), rtol=1e-13)1880 jn301 = special.jn_zeros(301,5)1881 assert_allclose(jn301, array([313.59097866698830153,1882 323.21549776096288280,1883 331.22338738656748796,1884 338.39676338872084500,1885 345.03284233056064157]), rtol=1e-13)1886 def test_jn_zeros_slow(self):1887 jn0 = special.jn_zeros(0, 300)1888 assert_allclose(jn0[260-1], 816.02884495068867280, rtol=1e-13)1889 assert_allclose(jn0[280-1], 878.86068707124422606, rtol=1e-13)1890 assert_allclose(jn0[300-1], 941.69253065317954064, rtol=1e-13)1891 jn10 = special.jn_zeros(10, 300)1892 assert_allclose(jn10[260-1], 831.67668514305631151, rtol=1e-13)1893 assert_allclose(jn10[280-1], 894.51275095371316931, rtol=1e-13)1894 assert_allclose(jn10[300-1], 957.34826370866539775, rtol=1e-13)1895 jn3010 = special.jn_zeros(3010,5)1896 assert_allclose(jn3010, array([3036.86590780927,1897 3057.06598526482,1898 3073.66360690272,1899 3088.37736494778,1900 3101.86438139042]), rtol=1e-8)1901 def test_jnjnp_zeros(self):1902 jn = special.jn1903 def jnp(n, x):1904 return (jn(n-1,x) - jn(n+1,x))/21905 for nt in range(1, 30):1906 z, n, m, t = special.jnjnp_zeros(nt)1907 for zz, nn, tt in zip(z, n, t):1908 if tt == 0:1909 assert_allclose(jn(nn, zz), 0, atol=1e-6)1910 elif tt == 1:1911 assert_allclose(jnp(nn, zz), 0, atol=1e-6)1912 else:1913 raise AssertionError("Invalid t return for nt=%d" % nt)1914 def test_jnp_zeros(self):1915 jnp = special.jnp_zeros(1,5)1916 assert_array_almost_equal(jnp, array([1.84118,1917 5.33144,1918 8.53632,1919 11.70600,1920 14.86359]),4)1921 jnp = special.jnp_zeros(443,5)1922 assert_allclose(special.jvp(443, jnp), 0, atol=1e-15)1923 def test_jnyn_zeros(self):1924 jnz = special.jnyn_zeros(1,5)1925 assert_array_almost_equal(jnz,(array([3.83171,1926 7.01559,1927 10.17347,1928 13.32369,1929 16.47063]),1930 array([1.84118,1931 5.33144,1932 8.53632,1933 11.70600,1934 14.86359]),1935 array([2.19714,1936 5.42968,1937 8.59601,1938 11.74915,1939 14.89744]),1940 array([3.68302,1941 6.94150,1942 10.12340,1943 13.28576,1944 16.44006])),5)1945 def test_jvp(self):1946 jvprim = special.jvp(2,2)1947 jv0 = (special.jv(1,2)-special.jv(3,2))/21948 assert_almost_equal(jvprim,jv0,10)1949 def test_k0(self):1950 ozk = special.k0(.1)1951 ozkr = special.kv(0,.1)1952 assert_almost_equal(ozk,ozkr,8)1953 def test_k0e(self):1954 ozke = special.k0e(.1)1955 ozker = special.kve(0,.1)1956 assert_almost_equal(ozke,ozker,8)1957 def test_k1(self):1958 o1k = special.k1(.1)1959 o1kr = special.kv(1,.1)1960 assert_almost_equal(o1k,o1kr,8)1961 def test_k1e(self):1962 o1ke = special.k1e(.1)1963 o1ker = special.kve(1,.1)1964 assert_almost_equal(o1ke,o1ker,8)1965 def test_jacobi(self):1966 a = 5*np.random.random() - 11967 b = 5*np.random.random() - 11968 P0 = special.jacobi(0,a,b)1969 P1 = special.jacobi(1,a,b)1970 P2 = special.jacobi(2,a,b)1971 P3 = special.jacobi(3,a,b)1972 assert_array_almost_equal(P0.c,[1],13)1973 assert_array_almost_equal(P1.c,array([a+b+2,a-b])/2.0,13)1974 cp = [(a+b+3)*(a+b+4), 4*(a+b+3)*(a+2), 4*(a+1)*(a+2)]1975 p2c = [cp[0],cp[1]-2*cp[0],cp[2]-cp[1]+cp[0]]1976 assert_array_almost_equal(P2.c,array(p2c)/8.0,13)1977 cp = [(a+b+4)*(a+b+5)*(a+b+6),6*(a+b+4)*(a+b+5)*(a+3),1978 12*(a+b+4)*(a+2)*(a+3),8*(a+1)*(a+2)*(a+3)]1979 p3c = [cp[0],cp[1]-3*cp[0],cp[2]-2*cp[1]+3*cp[0],cp[3]-cp[2]+cp[1]-cp[0]]1980 assert_array_almost_equal(P3.c,array(p3c)/48.0,13)1981 def test_kn(self):1982 kn1 = special.kn(0,.2)1983 assert_almost_equal(kn1,1.7527038555281462,8)1984 def test_negv_kv(self):1985 assert_equal(special.kv(3.0, 2.2), special.kv(-3.0, 2.2))1986 def test_kv0(self):1987 kv0 = special.kv(0,.2)1988 assert_almost_equal(kv0, 1.7527038555281462, 10)1989 def test_kv1(self):1990 kv1 = special.kv(1,0.2)1991 assert_almost_equal(kv1, 4.775972543220472, 10)1992 def test_kv2(self):1993 kv2 = special.kv(2,0.2)1994 assert_almost_equal(kv2, 49.51242928773287, 10)1995 def test_kn_largeorder(self):1996 assert_allclose(special.kn(32, 1), 1.7516596664574289e+43)1997 def test_kv_largearg(self):1998 assert_equal(special.kv(0, 1e19), 0)1999 def test_negv_kve(self):2000 assert_equal(special.kve(3.0, 2.2), special.kve(-3.0, 2.2))2001 def test_kve(self):2002 kve1 = special.kve(0,.2)2003 kv1 = special.kv(0,.2)*exp(.2)2004 assert_almost_equal(kve1,kv1,8)2005 z = .2+1j2006 kve2 = special.kve(0,z)2007 kv2 = special.kv(0,z)*exp(z)2008 assert_almost_equal(kve2,kv2,8)2009 def test_kvp_v0n1(self):2010 z = 2.22011 assert_almost_equal(-special.kv(1,z), special.kvp(0,z, n=1), 10)2012 def test_kvp_n1(self):2013 v = 3.2014 z = 2.22015 xc = -special.kv(v+1,z) + v/z*special.kv(v,z)2016 x = special.kvp(v,z, n=1)2017 assert_almost_equal(xc, x, 10) # this function (kvp) is broken2018 def test_kvp_n2(self):2019 v = 3.2020 z = 2.22021 xc = (z**2+v**2-v)/z**2 * special.kv(v,z) + special.kv(v+1,z)/z2022 x = special.kvp(v, z, n=2)2023 assert_almost_equal(xc, x, 10)2024 def test_y0(self):2025 oz = special.y0(.1)2026 ozr = special.yn(0,.1)2027 assert_almost_equal(oz,ozr,8)2028 def test_y1(self):2029 o1 = special.y1(.1)2030 o1r = special.yn(1,.1)2031 assert_almost_equal(o1,o1r,8)2032 def test_y0_zeros(self):2033 yo,ypo = special.y0_zeros(2)2034 zo,zpo = special.y0_zeros(2,complex=1)2035 all = r_[yo,zo]2036 allval = r_[ypo,zpo]2037 assert_array_almost_equal(abs(special.yv(0.0,all)),0.0,11)2038 assert_array_almost_equal(abs(special.yv(1,all)-allval),0.0,11)2039 def test_y1_zeros(self):2040 y1 = special.y1_zeros(1)2041 assert_array_almost_equal(y1,(array([2.19714]),array([0.52079])),5)2042 def test_y1p_zeros(self):2043 y1p = special.y1p_zeros(1,complex=1)2044 assert_array_almost_equal(y1p,(array([0.5768+0.904j]), array([-0.7635+0.5892j])),3)2045 def test_yn_zeros(self):2046 an = special.yn_zeros(4,2)2047 assert_array_almost_equal(an,array([5.64515, 9.36162]),5)2048 an = special.yn_zeros(443,5)2049 assert_allclose(an, [450.13573091578090314, 463.05692376675001542,2050 472.80651546418663566, 481.27353184725625838,2051 488.98055964441374646], rtol=1e-15)2052 def test_ynp_zeros(self):2053 ao = special.ynp_zeros(0,2)2054 assert_array_almost_equal(ao,array([2.19714133, 5.42968104]),6)2055 ao = special.ynp_zeros(43,5)2056 assert_allclose(special.yvp(43, ao), 0, atol=1e-15)2057 ao = special.ynp_zeros(443,5)2058 assert_allclose(special.yvp(443, ao), 0, atol=1e-9)2059 def test_ynp_zeros_large_order(self):2060 ao = special.ynp_zeros(443,5)2061 assert_allclose(special.yvp(443, ao), 0, atol=1e-14)2062 def test_yn(self):2063 yn2n = special.yn(1,.2)2064 assert_almost_equal(yn2n,-3.3238249881118471,8)2065 def test_negv_yv(self):2066 assert_almost_equal(special.yv(-3,2), -special.yv(3,2), 14)2067 def test_yv(self):2068 yv2 = special.yv(1,.2)2069 assert_almost_equal(yv2,-3.3238249881118471,8)2070 def test_negv_yve(self):2071 assert_almost_equal(special.yve(-3,2), -special.yve(3,2), 14)2072 def test_yve(self):2073 yve2 = special.yve(1,.2)2074 assert_almost_equal(yve2,-3.3238249881118471,8)2075 yve2r = special.yv(1,.2+1j)*exp(-1)2076 yve22 = special.yve(1,.2+1j)2077 assert_almost_equal(yve22,yve2r,8)2078 def test_yvp(self):2079 yvpr = (special.yv(1,.2) - special.yv(3,.2))/2.02080 yvp1 = special.yvp(2,.2)2081 assert_array_almost_equal(yvp1,yvpr,10)2082 def _cephes_vs_amos_points(self):2083 """Yield points at which to compare Cephes implementation to AMOS"""2084 # check several points, including large-amplitude ones2085 for v in [-120, -100.3, -20., -10., -1., -.5,2086 0., 1., 12.49, 120., 301]:2087 for z in [-1300, -11, -10, -1, 1., 10., 200.5, 401., 600.5,2088 700.6, 1300, 10003]:2089 yield v, z2090 # check half-integers; these are problematic points at least2091 # for cephes/iv2092 for v in 0.5 + arange(-60, 60):2093 yield v, 3.52094 def check_cephes_vs_amos(self, f1, f2, rtol=1e-11, atol=0, skip=None):2095 for v, z in self._cephes_vs_amos_points():2096 if skip is not None and skip(v, z):2097 continue2098 c1, c2, c3 = f1(v, z), f1(v,z+0j), f2(int(v), z)2099 if np.isinf(c1):2100 assert_(np.abs(c2) >= 1e300, (v, z))2101 elif np.isnan(c1):2102 assert_(c2.imag != 0, (v, z))2103 else:2104 assert_allclose(c1, c2, err_msg=(v, z), rtol=rtol, atol=atol)2105 if v == int(v):2106 assert_allclose(c3, c2, err_msg=(v, z),2107 rtol=rtol, atol=atol)2108 def test_jv_cephes_vs_amos(self):2109 self.check_cephes_vs_amos(special.jv, special.jn, rtol=1e-10, atol=1e-305)2110 def test_yv_cephes_vs_amos(self):2111 self.check_cephes_vs_amos(special.yv, special.yn, rtol=1e-11, atol=1e-305)2112 def test_yv_cephes_vs_amos_only_small_orders(self):2113 skipper = lambda v, z: (abs(v) > 50)2114 self.check_cephes_vs_amos(special.yv, special.yn, rtol=1e-11, atol=1e-305, skip=skipper)2115 def test_iv_cephes_vs_amos(self):2116 olderr = np.seterr(all='ignore')2117 try:2118 self.check_cephes_vs_amos(special.iv, special.iv, rtol=5e-9, atol=1e-305)2119 finally:2120 np.seterr(**olderr)2121 @pytest.mark.slow2122 def test_iv_cephes_vs_amos_mass_test(self):2123 N = 10000002124 np.random.seed(1)2125 v = np.random.pareto(0.5, N) * (-1)**np.random.randint(2, size=N)2126 x = np.random.pareto(0.2, N) * (-1)**np.random.randint(2, size=N)2127 imsk = (np.random.randint(8, size=N) == 0)2128 v[imsk] = v[imsk].astype(int)2129 old_err = np.seterr(all='ignore')2130 try:2131 c1 = special.iv(v, x)2132 c2 = special.iv(v, x+0j)2133 # deal with differences in the inf and zero cutoffs2134 c1[abs(c1) > 1e300] = np.inf2135 c2[abs(c2) > 1e300] = np.inf2136 c1[abs(c1) < 1e-300] = 02137 c2[abs(c2) < 1e-300] = 02138 dc = abs(c1/c2 - 1)2139 dc[np.isnan(dc)] = 02140 finally:2141 np.seterr(**old_err)2142 k = np.argmax(dc)2143 # Most error apparently comes from AMOS and not our implementation;2144 # there are some problems near integer orders there2145 assert_(dc[k] < 2e-7, (v[k], x[k], special.iv(v[k], x[k]), special.iv(v[k], x[k]+0j)))2146 def test_kv_cephes_vs_amos(self):2147 self.check_cephes_vs_amos(special.kv, special.kn, rtol=1e-9, atol=1e-305)2148 self.check_cephes_vs_amos(special.kv, special.kv, rtol=1e-9, atol=1e-305)2149 def test_ticket_623(self):2150 assert_allclose(special.jv(3, 4), 0.43017147387562193)2151 assert_allclose(special.jv(301, 1300), 0.0183487151115275)2152 assert_allclose(special.jv(301, 1296.0682), -0.0224174325312048)2153 def test_ticket_853(self):2154 """Negative-order Bessels"""2155 # cephes2156 assert_allclose(special.jv(-1, 1), -0.4400505857449335)2157 assert_allclose(special.jv(-2, 1), 0.1149034849319005)2158 assert_allclose(special.yv(-1, 1), 0.7812128213002887)2159 assert_allclose(special.yv(-2, 1), -1.650682606816255)2160 assert_allclose(special.iv(-1, 1), 0.5651591039924851)2161 assert_allclose(special.iv(-2, 1), 0.1357476697670383)2162 assert_allclose(special.kv(-1, 1), 0.6019072301972347)2163 assert_allclose(special.kv(-2, 1), 1.624838898635178)2164 assert_allclose(special.jv(-0.5, 1), 0.43109886801837607952)2165 assert_allclose(special.yv(-0.5, 1), 0.6713967071418031)2166 assert_allclose(special.iv(-0.5, 1), 1.231200214592967)2167 assert_allclose(special.kv(-0.5, 1), 0.4610685044478945)2168 # amos2169 assert_allclose(special.jv(-1, 1+0j), -0.4400505857449335)2170 assert_allclose(special.jv(-2, 1+0j), 0.1149034849319005)2171 assert_allclose(special.yv(-1, 1+0j), 0.7812128213002887)2172 assert_allclose(special.yv(-2, 1+0j), -1.650682606816255)2173 assert_allclose(special.iv(-1, 1+0j), 0.5651591039924851)2174 assert_allclose(special.iv(-2, 1+0j), 0.1357476697670383)2175 assert_allclose(special.kv(-1, 1+0j), 0.6019072301972347)2176 assert_allclose(special.kv(-2, 1+0j), 1.624838898635178)2177 assert_allclose(special.jv(-0.5, 1+0j), 0.43109886801837607952)2178 assert_allclose(special.jv(-0.5, 1+1j), 0.2628946385649065-0.827050182040562j)2179 assert_allclose(special.yv(-0.5, 1+0j), 0.6713967071418031)2180 assert_allclose(special.yv(-0.5, 1+1j), 0.967901282890131+0.0602046062142816j)2181 assert_allclose(special.iv(-0.5, 1+0j), 1.231200214592967)2182 assert_allclose(special.iv(-0.5, 1+1j), 0.77070737376928+0.39891821043561j)2183 assert_allclose(special.kv(-0.5, 1+0j), 0.4610685044478945)2184 assert_allclose(special.kv(-0.5, 1+1j), 0.06868578341999-0.38157825981268j)2185 assert_allclose(special.jve(-0.5,1+0.3j), special.jv(-0.5, 1+0.3j)*exp(-0.3))2186 assert_allclose(special.yve(-0.5,1+0.3j), special.yv(-0.5, 1+0.3j)*exp(-0.3))2187 assert_allclose(special.ive(-0.5,0.3+1j), special.iv(-0.5, 0.3+1j)*exp(-0.3))2188 assert_allclose(special.kve(-0.5,0.3+1j), special.kv(-0.5, 0.3+1j)*exp(0.3+1j))2189 assert_allclose(special.hankel1(-0.5, 1+1j), special.jv(-0.5, 1+1j) + 1j*special.yv(-0.5,1+1j))2190 assert_allclose(special.hankel2(-0.5, 1+1j), special.jv(-0.5, 1+1j) - 1j*special.yv(-0.5,1+1j))2191 def test_ticket_854(self):2192 """Real-valued Bessel domains"""2193 assert_(isnan(special.jv(0.5, -1)))2194 assert_(isnan(special.iv(0.5, -1)))2195 assert_(isnan(special.yv(0.5, -1)))2196 assert_(isnan(special.yv(1, -1)))2197 assert_(isnan(special.kv(0.5, -1)))2198 assert_(isnan(special.kv(1, -1)))2199 assert_(isnan(special.jve(0.5, -1)))2200 assert_(isnan(special.ive(0.5, -1)))2201 assert_(isnan(special.yve(0.5, -1)))2202 assert_(isnan(special.yve(1, -1)))2203 assert_(isnan(special.kve(0.5, -1)))2204 assert_(isnan(special.kve(1, -1)))2205 assert_(isnan(special.airye(-1)[0:2]).all(), special.airye(-1))2206 assert_(not isnan(special.airye(-1)[2:4]).any(), special.airye(-1))2207 def test_gh_7909(self):2208 assert_(special.kv(1.5, 0) == np.inf)2209 assert_(special.kve(1.5, 0) == np.inf)2210 def test_ticket_503(self):2211 """Real-valued Bessel I overflow"""2212 assert_allclose(special.iv(1, 700), 1.528500390233901e302)2213 assert_allclose(special.iv(1000, 1120), 1.301564549405821e301)2214 def test_iv_hyperg_poles(self):2215 assert_allclose(special.iv(-0.5, 1), 1.231200214592967)2216 def iv_series(self, v, z, n=200):2217 k = arange(0, n).astype(float_)2218 r = (v+2*k)*log(.5*z) - special.gammaln(k+1) - special.gammaln(v+k+1)2219 r[isnan(r)] = inf2220 r = exp(r)2221 err = abs(r).max() * finfo(float_).eps * n + abs(r[-1])*102222 return r.sum(), err2223 def test_i0_series(self):2224 for z in [1., 10., 200.5]:2225 value, err = self.iv_series(0, z)2226 assert_allclose(special.i0(z), value, atol=err, err_msg=z)2227 def test_i1_series(self):2228 for z in [1., 10., 200.5]:2229 value, err = self.iv_series(1, z)2230 assert_allclose(special.i1(z), value, atol=err, err_msg=z)2231 def test_iv_series(self):2232 for v in [-20., -10., -1., 0., 1., 12.49, 120.]:2233 for z in [1., 10., 200.5, -1+2j]:2234 value, err = self.iv_series(v, z)2235 assert_allclose(special.iv(v, z), value, atol=err, err_msg=(v, z))2236 def test_i0(self):2237 values = [[0.0, 1.0],2238 [1e-10, 1.0],2239 [0.1, 0.9071009258],2240 [0.5, 0.6450352706],2241 [1.0, 0.4657596077],2242 [2.5, 0.2700464416],2243 [5.0, 0.1835408126],2244 [20.0, 0.0897803119],2245 ]2246 for i, (x, v) in enumerate(values):2247 cv = special.i0(x) * exp(-x)2248 assert_almost_equal(cv, v, 8, err_msg='test #%d' % i)2249 def test_i0e(self):2250 oize = special.i0e(.1)2251 oizer = special.ive(0,.1)2252 assert_almost_equal(oize,oizer,8)2253 def test_i1(self):2254 values = [[0.0, 0.0],2255 [1e-10, 0.4999999999500000e-10],2256 [0.1, 0.0452984468],2257 [0.5, 0.1564208032],2258 [1.0, 0.2079104154],2259 [5.0, 0.1639722669],2260 [20.0, 0.0875062222],2261 ]2262 for i, (x, v) in enumerate(values):2263 cv = special.i1(x) * exp(-x)2264 assert_almost_equal(cv, v, 8, err_msg='test #%d' % i)2265 def test_i1e(self):2266 oi1e = special.i1e(.1)2267 oi1er = special.ive(1,.1)2268 assert_almost_equal(oi1e,oi1er,8)2269 def test_iti0k0(self):2270 iti0 = array(special.iti0k0(5))2271 assert_array_almost_equal(iti0,array([31.848667776169801, 1.5673873907283657]),5)2272 def test_it2i0k0(self):2273 it2k = special.it2i0k0(.1)2274 assert_array_almost_equal(it2k,array([0.0012503906973464409, 3.3309450354686687]),6)2275 def test_iv(self):2276 iv1 = special.iv(0,.1)*exp(-.1)2277 assert_almost_equal(iv1,0.90710092578230106,10)2278 def test_negv_ive(self):2279 assert_equal(special.ive(3,2), special.ive(-3,2))2280 def test_ive(self):2281 ive1 = special.ive(0,.1)2282 iv1 = special.iv(0,.1)*exp(-.1)2283 assert_almost_equal(ive1,iv1,10)2284 def test_ivp0(self):2285 assert_almost_equal(special.iv(1,2), special.ivp(0,2), 10)2286 def test_ivp(self):2287 y = (special.iv(0,2) + special.iv(2,2))/22288 x = special.ivp(1,2)2289 assert_almost_equal(x,y,10)2290class TestLaguerre(object):2291 def test_laguerre(self):2292 lag0 = special.laguerre(0)2293 lag1 = special.laguerre(1)2294 lag2 = special.laguerre(2)2295 lag3 = special.laguerre(3)2296 lag4 = special.laguerre(4)2297 lag5 = special.laguerre(5)2298 assert_array_almost_equal(lag0.c,[1],13)2299 assert_array_almost_equal(lag1.c,[-1,1],13)2300 assert_array_almost_equal(lag2.c,array([1,-4,2])/2.0,13)2301 assert_array_almost_equal(lag3.c,array([-1,9,-18,6])/6.0,13)2302 assert_array_almost_equal(lag4.c,array([1,-16,72,-96,24])/24.0,13)2303 assert_array_almost_equal(lag5.c,array([-1,25,-200,600,-600,120])/120.0,13)2304 def test_genlaguerre(self):2305 k = 5*np.random.random() - 0.92306 lag0 = special.genlaguerre(0,k)2307 lag1 = special.genlaguerre(1,k)2308 lag2 = special.genlaguerre(2,k)2309 lag3 = special.genlaguerre(3,k)2310 assert_equal(lag0.c,[1])2311 assert_equal(lag1.c,[-1,k+1])2312 assert_almost_equal(lag2.c,array([1,-2*(k+2),(k+1.)*(k+2.)])/2.0)2313 assert_almost_equal(lag3.c,array([-1,3*(k+3),-3*(k+2)*(k+3),(k+1)*(k+2)*(k+3)])/6.0)2314# Base polynomials come from Abrahmowitz and Stegan2315class TestLegendre(object):2316 def test_legendre(self):2317 leg0 = special.legendre(0)2318 leg1 = special.legendre(1)2319 leg2 = special.legendre(2)2320 leg3 = special.legendre(3)2321 leg4 = special.legendre(4)2322 leg5 = special.legendre(5)2323 assert_equal(leg0.c, [1])2324 assert_equal(leg1.c, [1,0])2325 assert_almost_equal(leg2.c, array([3,0,-1])/2.0, decimal=13)2326 assert_almost_equal(leg3.c, array([5,0,-3,0])/2.0)2327 assert_almost_equal(leg4.c, array([35,0,-30,0,3])/8.0)2328 assert_almost_equal(leg5.c, array([63,0,-70,0,15,0])/8.0)2329class TestLambda(object):2330 def test_lmbda(self):2331 lam = special.lmbda(1,.1)2332 lamr = (array([special.jn(0,.1), 2*special.jn(1,.1)/.1]),2333 array([special.jvp(0,.1), -2*special.jv(1,.1)/.01 + 2*special.jvp(1,.1)/.1]))2334 assert_array_almost_equal(lam,lamr,8)2335class TestLog1p(object):2336 def test_log1p(self):2337 l1p = (special.log1p(10), special.log1p(11), special.log1p(12))2338 l1prl = (log(11), log(12), log(13))2339 assert_array_almost_equal(l1p,l1prl,8)2340 def test_log1pmore(self):2341 l1pm = (special.log1p(1), special.log1p(1.1), special.log1p(1.2))2342 l1pmrl = (log(2),log(2.1),log(2.2))2343 assert_array_almost_equal(l1pm,l1pmrl,8)2344class TestLegendreFunctions(object):2345 def test_clpmn(self):2346 z = 0.5+0.3j2347 clp = special.clpmn(2, 2, z, 3)2348 assert_array_almost_equal(clp,2349 (array([[1.0000, z, 0.5*(3*z*z-1)],2350 [0.0000, sqrt(z*z-1), 3*z*sqrt(z*z-1)],2351 [0.0000, 0.0000, 3*(z*z-1)]]),2352 array([[0.0000, 1.0000, 3*z],2353 [0.0000, z/sqrt(z*z-1), 3*(2*z*z-1)/sqrt(z*z-1)],2354 [0.0000, 0.0000, 6*z]])),2355 7)2356 def test_clpmn_close_to_real_2(self):2357 eps = 1e-102358 m = 12359 n = 32360 x = 0.52361 clp_plus = special.clpmn(m, n, x+1j*eps, 2)[0][m, n]2362 clp_minus = special.clpmn(m, n, x-1j*eps, 2)[0][m, n]2363 assert_array_almost_equal(array([clp_plus, clp_minus]),2364 array([special.lpmv(m, n, x),2365 special.lpmv(m, n, x)]),2366 7)2367 def test_clpmn_close_to_real_3(self):2368 eps = 1e-102369 m = 12370 n = 32371 x = 0.52372 clp_plus = special.clpmn(m, n, x+1j*eps, 3)[0][m, n]2373 clp_minus = special.clpmn(m, n, x-1j*eps, 3)[0][m, n]2374 assert_array_almost_equal(array([clp_plus, clp_minus]),2375 array([special.lpmv(m, n, x)*np.exp(-0.5j*m*np.pi),2376 special.lpmv(m, n, x)*np.exp(0.5j*m*np.pi)]),2377 7)2378 def test_clpmn_across_unit_circle(self):2379 eps = 1e-72380 m = 12381 n = 12382 x = 1j2383 for type in [2, 3]:2384 assert_almost_equal(special.clpmn(m, n, x+1j*eps, type)[0][m, n],2385 special.clpmn(m, n, x-1j*eps, type)[0][m, n], 6)2386 def test_inf(self):2387 for z in (1, -1):2388 for n in range(4):2389 for m in range(1, n):2390 lp = special.clpmn(m, n, z)2391 assert_(np.isinf(lp[1][1,1:]).all())2392 lp = special.lpmn(m, n, z)2393 assert_(np.isinf(lp[1][1,1:]).all())2394 def test_deriv_clpmn(self):2395 # data inside and outside of the unit circle2396 zvals = [0.5+0.5j, -0.5+0.5j, -0.5-0.5j, 0.5-0.5j,2397 1+1j, -1+1j, -1-1j, 1-1j]2398 m = 22399 n = 32400 for type in [2, 3]:2401 for z in zvals:2402 for h in [1e-3, 1e-3j]:2403 approx_derivative = (special.clpmn(m, n, z+0.5*h, type)[0]2404 - special.clpmn(m, n, z-0.5*h, type)[0])/h2405 assert_allclose(special.clpmn(m, n, z, type)[1],2406 approx_derivative,2407 rtol=1e-4)2408 def test_lpmn(self):2409 lp = special.lpmn(0,2,.5)2410 assert_array_almost_equal(lp,(array([[1.00000,2411 0.50000,2412 -0.12500]]),2413 array([[0.00000,2414 1.00000,2415 1.50000]])),4)2416 def test_lpn(self):2417 lpnf = special.lpn(2,.5)2418 assert_array_almost_equal(lpnf,(array([1.00000,2419 0.50000,2420 -0.12500]),2421 array([0.00000,2422 1.00000,2423 1.50000])),4)2424 def test_lpmv(self):2425 lp = special.lpmv(0,2,.5)2426 assert_almost_equal(lp,-0.125,7)2427 lp = special.lpmv(0,40,.001)2428 assert_almost_equal(lp,0.1252678976534484,7)2429 # XXX: this is outside the domain of the current implementation,2430 # so ensure it returns a NaN rather than a wrong answer.2431 olderr = np.seterr(all='ignore')2432 try:2433 lp = special.lpmv(-1,-1,.001)2434 finally:2435 np.seterr(**olderr)2436 assert_(lp != 0 or np.isnan(lp))2437 def test_lqmn(self):2438 lqmnf = special.lqmn(0,2,.5)2439 lqf = special.lqn(2,.5)2440 assert_array_almost_equal(lqmnf[0][0],lqf[0],4)2441 assert_array_almost_equal(lqmnf[1][0],lqf[1],4)2442 def test_lqmn_gt1(self):2443 """algorithm for real arguments changes at 1.00012444 test against analytical result for m=2, n=12445 """2446 x0 = 1.00012447 delta = 0.000022448 for x in (x0-delta, x0+delta):2449 lq = special.lqmn(2, 1, x)[0][-1, -1]2450 expected = 2/(x*x-1)2451 assert_almost_equal(lq, expected)2452 def test_lqmn_shape(self):2453 a, b = special.lqmn(4, 4, 1.1)2454 assert_equal(a.shape, (5, 5))2455 assert_equal(b.shape, (5, 5))2456 a, b = special.lqmn(4, 0, 1.1)2457 assert_equal(a.shape, (5, 1))2458 assert_equal(b.shape, (5, 1))2459 def test_lqn(self):2460 lqf = special.lqn(2,.5)2461 assert_array_almost_equal(lqf,(array([0.5493, -0.7253, -0.8187]),2462 array([1.3333, 1.216, -0.8427])),4)2463class TestMathieu(object):2464 def test_mathieu_a(self):2465 pass2466 def test_mathieu_even_coef(self):2467 mc = special.mathieu_even_coef(2,5)2468 # Q not defined broken and cannot figure out proper reporting order2469 def test_mathieu_odd_coef(self):2470 # same problem as above2471 pass2472class TestFresnelIntegral(object):2473 def test_modfresnelp(self):2474 pass2475 def test_modfresnelm(self):2476 pass2477class TestOblCvSeq(object):2478 def test_obl_cv_seq(self):2479 obl = special.obl_cv_seq(0,3,1)2480 assert_array_almost_equal(obl,array([-0.348602,2481 1.393206,2482 5.486800,2483 11.492120]),5)2484class TestParabolicCylinder(object):2485 def test_pbdn_seq(self):2486 pb = special.pbdn_seq(1,.1)2487 assert_array_almost_equal(pb,(array([0.9975,2488 0.0998]),2489 array([-0.0499,2490 0.9925])),4)2491 def test_pbdv(self):2492 pbv = special.pbdv(1,.2)2493 derrl = 1/2*(.2)*special.pbdv(1,.2)[0] - special.pbdv(0,.2)[0]2494 def test_pbdv_seq(self):2495 pbn = special.pbdn_seq(1,.1)2496 pbv = special.pbdv_seq(1,.1)2497 assert_array_almost_equal(pbv,(real(pbn[0]),real(pbn[1])),4)2498 def test_pbdv_points(self):2499 # simple case2500 eta = np.linspace(-10, 10, 5)2501 z = 2**(eta/2)*np.sqrt(np.pi)/special.gamma(.5-.5*eta)2502 assert_allclose(special.pbdv(eta, 0.)[0], z, rtol=1e-14, atol=1e-14)2503 # some points2504 assert_allclose(special.pbdv(10.34, 20.44)[0], 1.3731383034455e-32, rtol=1e-12)2505 assert_allclose(special.pbdv(-9.53, 3.44)[0], 3.166735001119246e-8, rtol=1e-12)2506 def test_pbdv_gradient(self):2507 x = np.linspace(-4, 4, 8)[:,None]2508 eta = np.linspace(-10, 10, 5)[None,:]2509 p = special.pbdv(eta, x)2510 eps = 1e-7 + 1e-7*abs(x)2511 dp = (special.pbdv(eta, x + eps)[0] - special.pbdv(eta, x - eps)[0]) / eps / 2.2512 assert_allclose(p[1], dp, rtol=1e-6, atol=1e-6)2513 def test_pbvv_gradient(self):2514 x = np.linspace(-4, 4, 8)[:,None]2515 eta = np.linspace(-10, 10, 5)[None,:]2516 p = special.pbvv(eta, x)2517 eps = 1e-7 + 1e-7*abs(x)2518 dp = (special.pbvv(eta, x + eps)[0] - special.pbvv(eta, x - eps)[0]) / eps / 2.2519 assert_allclose(p[1], dp, rtol=1e-6, atol=1e-6)2520class TestPolygamma(object):2521 # from Table 6.2 (pg. 271) of A&S2522 def test_polygamma(self):2523 poly2 = special.polygamma(2,1)2524 poly3 = special.polygamma(3,1)2525 assert_almost_equal(poly2,-2.4041138063,10)2526 assert_almost_equal(poly3,6.4939394023,10)2527 # Test polygamma(0, x) == psi(x)2528 x = [2, 3, 1.1e14]2529 assert_almost_equal(special.polygamma(0, x), special.psi(x))2530 # Test broadcasting2531 n = [0, 1, 2]2532 x = [0.5, 1.5, 2.5]2533 expected = [-1.9635100260214238, 0.93480220054467933,2534 -0.23620405164172739]2535 assert_almost_equal(special.polygamma(n, x), expected)2536 expected = np.row_stack([expected]*2)2537 assert_almost_equal(special.polygamma(n, np.row_stack([x]*2)),2538 expected)2539 assert_almost_equal(special.polygamma(np.row_stack([n]*2), x),2540 expected)2541class TestProCvSeq(object):2542 def test_pro_cv_seq(self):2543 prol = special.pro_cv_seq(0,3,1)2544 assert_array_almost_equal(prol,array([0.319000,2545 2.593084,2546 6.533471,2547 12.514462]),5)2548class TestPsi(object):2549 def test_psi(self):2550 ps = special.psi(1)2551 assert_almost_equal(ps,-0.57721566490153287,8)2552class TestRadian(object):2553 def test_radian(self):2554 rad = special.radian(90,0,0)2555 assert_almost_equal(rad,pi/2.0,5)2556 def test_radianmore(self):2557 rad1 = special.radian(90,1,60)2558 assert_almost_equal(rad1,pi/2+0.0005816135199345904,5)2559class TestRiccati(object):2560 def test_riccati_jn(self):2561 N, x = 2, 0.22562 S = np.empty((N, N))2563 for n in range(N):2564 j = special.spherical_jn(n, x)2565 jp = special.spherical_jn(n, x, derivative=True)2566 S[0,n] = x*j2567 S[1,n] = x*jp + j2568 assert_array_almost_equal(S, special.riccati_jn(n, x), 8)2569 def test_riccati_yn(self):2570 N, x = 2, 0.22571 C = np.empty((N, N))2572 for n in range(N):2573 y = special.spherical_yn(n, x)2574 yp = special.spherical_yn(n, x, derivative=True)2575 C[0,n] = x*y2576 C[1,n] = x*yp + y2577 assert_array_almost_equal(C, special.riccati_yn(n, x), 8)2578class TestRound(object):2579 def test_round(self):2580 rnd = list(map(int,(special.round(10.1),special.round(10.4),special.round(10.5),special.round(10.6))))2581 # Note: According to the documentation, scipy.special.round is2582 # supposed to round to the nearest even number if the fractional2583 # part is exactly 0.5. On some platforms, this does not appear2584 # to work and thus this test may fail. However, this unit test is2585 # correctly written.2586 rndrl = (10,10,10,11)2587 assert_array_equal(rnd,rndrl)2588def test_sph_harm():2589 # Tests derived from tables in2590 # https://en.wikipedia.org/wiki/Table_of_spherical_harmonics2591 sh = special.sph_harm2592 pi = np.pi2593 exp = np.exp2594 sqrt = np.sqrt2595 sin = np.sin2596 cos = np.cos2597 assert_array_almost_equal(sh(0,0,0,0),2598 0.5/sqrt(pi))2599 assert_array_almost_equal(sh(-2,2,0.,pi/4),2600 0.25*sqrt(15./(2.*pi)) *2601 (sin(pi/4))**2.)2602 assert_array_almost_equal(sh(-2,2,0.,pi/2),2603 0.25*sqrt(15./(2.*pi)))2604 assert_array_almost_equal(sh(2,2,pi,pi/2),2605 0.25*sqrt(15/(2.*pi)) *2606 exp(0+2.*pi*1j)*sin(pi/2.)**2.)2607 assert_array_almost_equal(sh(2,4,pi/4.,pi/3.),2608 (3./8.)*sqrt(5./(2.*pi)) *2609 exp(0+2.*pi/4.*1j) *2610 sin(pi/3.)**2. *2611 (7.*cos(pi/3.)**2.-1))2612 assert_array_almost_equal(sh(4,4,pi/8.,pi/6.),2613 (3./16.)*sqrt(35./(2.*pi)) *2614 exp(0+4.*pi/8.*1j)*sin(pi/6.)**4.)2615def test_sph_harm_ufunc_loop_selection():2616 # see https://github.com/scipy/scipy/issues/48952617 dt = np.dtype(np.complex128)2618 assert_equal(special.sph_harm(0, 0, 0, 0).dtype, dt)2619 assert_equal(special.sph_harm([0], 0, 0, 0).dtype, dt)2620 assert_equal(special.sph_harm(0, [0], 0, 0).dtype, dt)2621 assert_equal(special.sph_harm(0, 0, [0], 0).dtype, dt)2622 assert_equal(special.sph_harm(0, 0, 0, [0]).dtype, dt)2623 assert_equal(special.sph_harm([0], [0], [0], [0]).dtype, dt)2624class TestStruve(object):2625 def _series(self, v, z, n=100):2626 """Compute Struve function & error estimate from its power series."""2627 k = arange(0, n)2628 r = (-1)**k * (.5*z)**(2*k+v+1)/special.gamma(k+1.5)/special.gamma(k+v+1.5)2629 err = abs(r).max() * finfo(float_).eps * n2630 return r.sum(), err2631 def test_vs_series(self):2632 """Check Struve function versus its power series"""2633 for v in [-20, -10, -7.99, -3.4, -1, 0, 1, 3.4, 12.49, 16]:2634 for z in [1, 10, 19, 21, 30]:2635 value, err = self._series(v, z)2636 assert_allclose(special.struve(v, z), value, rtol=0, atol=err), (v, z)2637 def test_some_values(self):2638 assert_allclose(special.struve(-7.99, 21), 0.0467547614113, rtol=1e-7)2639 assert_allclose(special.struve(-8.01, 21), 0.0398716951023, rtol=1e-8)2640 assert_allclose(special.struve(-3.0, 200), 0.0142134427432, rtol=1e-12)2641 assert_allclose(special.struve(-8.0, -41), 0.0192469727846, rtol=1e-11)2642 assert_equal(special.struve(-12, -41), -special.struve(-12, 41))2643 assert_equal(special.struve(+12, -41), -special.struve(+12, 41))2644 assert_equal(special.struve(-11, -41), +special.struve(-11, 41))2645 assert_equal(special.struve(+11, -41), +special.struve(+11, 41))2646 assert_(isnan(special.struve(-7.1, -1)))2647 assert_(isnan(special.struve(-10.1, -1)))2648 def test_regression_679(self):2649 """Regression test for #679"""2650 assert_allclose(special.struve(-1.0, 20 - 1e-8), special.struve(-1.0, 20 + 1e-8))2651 assert_allclose(special.struve(-2.0, 20 - 1e-8), special.struve(-2.0, 20 + 1e-8))2652 assert_allclose(special.struve(-4.3, 20 - 1e-8), special.struve(-4.3, 20 + 1e-8))2653def test_chi2_smalldf():2654 assert_almost_equal(special.chdtr(0.6,3), 0.957890536704110)2655def test_ch2_inf():2656 assert_equal(special.chdtr(0.7,np.inf), 1.0)2657def test_chi2c_smalldf():2658 assert_almost_equal(special.chdtrc(0.6,3), 1-0.957890536704110)2659def test_chi2_inv_smalldf():2660 assert_almost_equal(special.chdtri(0.6,1-0.957890536704110), 3)2661def test_agm_simple():2662 rtol = 1e-132663 # Gauss's constant2664 assert_allclose(1/special.agm(1, np.sqrt(2)), 0.834626841674073186,2665 rtol=rtol)2666 # These values were computed using Wolfram Alpha, with the2667 # function ArithmeticGeometricMean[a, b].2668 agm13 = 1.8636167832448972669 agm15 = 2.6040081905309402670 agm35 = 3.9362355036495552671 assert_allclose(special.agm([[1], [3]], [1, 3, 5]),2672 [[1, agm13, agm15],2673 [agm13, 3, agm35]], rtol=rtol)2674 # Computed by the iteration formula using mpmath,2675 # with mpmath.mp.prec = 1000:2676 agm12 = 1.45679103104690682677 assert_allclose(special.agm(1, 2), agm12, rtol=rtol)2678 assert_allclose(special.agm(2, 1), agm12, rtol=rtol)2679 assert_allclose(special.agm(-1, -2), -agm12, rtol=rtol)2680 assert_allclose(special.agm(24, 6), 13.458171481725614, rtol=rtol)2681 assert_allclose(special.agm(13, 123456789.5), 11111458.498599306,2682 rtol=rtol)2683 assert_allclose(special.agm(1e30, 1), 2.229223055945383e+28, rtol=rtol)2684 assert_allclose(special.agm(1e-22, 1), 0.030182566420169886, rtol=rtol)2685 assert_allclose(special.agm(1e150, 1e180), 2.229223055945383e+178,2686 rtol=rtol)2687 assert_allclose(special.agm(1e180, 1e-150), 2.0634722510162677e+177,2688 rtol=rtol)2689 assert_allclose(special.agm(1e-150, 1e-170), 3.3112619670463756e-152,2690 rtol=rtol)2691 fi = np.finfo(1.0)2692 assert_allclose(special.agm(fi.tiny, fi.max), 1.9892072050015473e+305,2693 rtol=rtol)2694 assert_allclose(special.agm(0.75*fi.max, fi.max), 1.564904312298045e+308,2695 rtol=rtol)2696 assert_allclose(special.agm(fi.tiny, 3*fi.tiny), 4.1466849866735005e-308,2697 rtol=rtol)2698 # zero, nan and inf cases.2699 assert_equal(special.agm(0, 0), 0)2700 assert_equal(special.agm(99, 0), 0)2701 assert_equal(special.agm(-1, 10), np.nan)2702 assert_equal(special.agm(0, np.inf), np.nan)2703 assert_equal(special.agm(np.inf, 0), np.nan)2704 assert_equal(special.agm(0, -np.inf), np.nan)2705 assert_equal(special.agm(-np.inf, 0), np.nan)2706 assert_equal(special.agm(np.inf, -np.inf), np.nan)2707 assert_equal(special.agm(-np.inf, np.inf), np.nan)2708 assert_equal(special.agm(1, np.nan), np.nan)2709 assert_equal(special.agm(np.nan, -1), np.nan)2710 assert_equal(special.agm(1, np.inf), np.inf)2711 assert_equal(special.agm(np.inf, 1), np.inf)2712 assert_equal(special.agm(-1, -np.inf), -np.inf)2713 assert_equal(special.agm(-np.inf, -1), -np.inf)2714def test_legacy():2715 # Legacy behavior: truncating arguments to integers2716 with suppress_warnings() as sup:2717 sup.filter(RuntimeWarning, "floating point number truncated to an integer")2718 assert_equal(special.bdtrc(1, 2, 0.3), special.bdtrc(1.8, 2.8, 0.3))2719 assert_equal(special.bdtr(1, 2, 0.3), special.bdtr(1.8, 2.8, 0.3))2720 assert_equal(special.bdtri(1, 2, 0.3), special.bdtri(1.8, 2.8, 0.3))2721 assert_equal(special.expn(1, 0.3), special.expn(1.8, 0.3))2722 assert_equal(special.nbdtrc(1, 2, 0.3), special.nbdtrc(1.8, 2.8, 0.3))2723 assert_equal(special.nbdtr(1, 2, 0.3), special.nbdtr(1.8, 2.8, 0.3))2724 assert_equal(special.nbdtri(1, 2, 0.3), special.nbdtri(1.8, 2.8, 0.3))2725 assert_equal(special.pdtrc(1, 0.3), special.pdtrc(1.8, 0.3))2726 assert_equal(special.pdtr(1, 0.3), special.pdtr(1.8, 0.3))2727 assert_equal(special.pdtri(1, 0.3), special.pdtri(1.8, 0.3))2728 assert_equal(special.kn(1, 0.3), special.kn(1.8, 0.3))2729 assert_equal(special.yn(1, 0.3), special.yn(1.8, 0.3))2730 assert_equal(special.smirnov(1, 0.3), special.smirnov(1.8, 0.3))2731 assert_equal(special.smirnovi(1, 0.3), special.smirnovi(1.8, 0.3))2732@with_special_errors2733def test_error_raising():2734 assert_raises(special.SpecialFunctionError, special.iv, 1, 1e99j)2735def test_xlogy():2736 def xfunc(x, y):2737 with np.errstate(invalid='ignore'):2738 if x == 0 and not np.isnan(y):2739 return x2740 else:2741 return x*np.log(y)2742 z1 = np.asarray([(0,0), (0, np.nan), (0, np.inf), (1.0, 2.0)], dtype=float)2743 z2 = np.r_[z1, [(0, 1j), (1, 1j)]]2744 w1 = np.vectorize(xfunc)(z1[:,0], z1[:,1])2745 assert_func_equal(special.xlogy, w1, z1, rtol=1e-13, atol=1e-13)2746 w2 = np.vectorize(xfunc)(z2[:,0], z2[:,1])2747 assert_func_equal(special.xlogy, w2, z2, rtol=1e-13, atol=1e-13)2748def test_xlog1py():2749 def xfunc(x, y):2750 with np.errstate(invalid='ignore'):2751 if x == 0 and not np.isnan(y):2752 return x2753 else:2754 return x * np.log1p(y)2755 z1 = np.asarray([(0,0), (0, np.nan), (0, np.inf), (1.0, 2.0),2756 (1, 1e-30)], dtype=float)2757 w1 = np.vectorize(xfunc)(z1[:,0], z1[:,1])2758 assert_func_equal(special.xlog1py, w1, z1, rtol=1e-13, atol=1e-13)2759def test_entr():2760 def xfunc(x):2761 if x < 0:2762 return -np.inf2763 else:2764 return -special.xlogy(x, x)2765 values = (0, 0.5, 1.0, np.inf)2766 signs = [-1, 1]2767 arr = []2768 for sgn, v in itertools.product(signs, values):2769 arr.append(sgn * v)2770 z = np.array(arr, dtype=float)2771 w = np.vectorize(xfunc, otypes=[np.float64])(z)2772 assert_func_equal(special.entr, w, z, rtol=1e-13, atol=1e-13)2773def test_kl_div():2774 def xfunc(x, y):2775 if x < 0 or y < 0 or (y == 0 and x != 0):2776 # extension of natural domain to preserve convexity2777 return np.inf2778 elif np.isposinf(x) or np.isposinf(y):2779 # limits within the natural domain2780 return np.inf2781 elif x == 0:2782 return y2783 else:2784 return special.xlogy(x, x/y) - x + y2785 values = (0, 0.5, 1.0)2786 signs = [-1, 1]2787 arr = []2788 for sgna, va, sgnb, vb in itertools.product(signs, values, signs, values):2789 arr.append((sgna*va, sgnb*vb))2790 z = np.array(arr, dtype=float)2791 w = np.vectorize(xfunc, otypes=[np.float64])(z[:,0], z[:,1])2792 assert_func_equal(special.kl_div, w, z, rtol=1e-13, atol=1e-13)2793def test_rel_entr():2794 def xfunc(x, y):2795 if x > 0 and y > 0:2796 return special.xlogy(x, x/y)2797 elif x == 0 and y >= 0:2798 return 02799 else:2800 return np.inf2801 values = (0, 0.5, 1.0)2802 signs = [-1, 1]2803 arr = []2804 for sgna, va, sgnb, vb in itertools.product(signs, values, signs, values):2805 arr.append((sgna*va, sgnb*vb))2806 z = np.array(arr, dtype=float)2807 w = np.vectorize(xfunc, otypes=[np.float64])(z[:,0], z[:,1])2808 assert_func_equal(special.rel_entr, w, z, rtol=1e-13, atol=1e-13)2809def test_huber():2810 assert_equal(special.huber(-1, 1.5), np.inf)2811 assert_allclose(special.huber(2, 1.5), 0.5 * np.square(1.5))2812 assert_allclose(special.huber(2, 2.5), 2 * (2.5 - 0.5 * 2))2813 def xfunc(delta, r):2814 if delta < 0:2815 return np.inf2816 elif np.abs(r) < delta:2817 return 0.5 * np.square(r)2818 else:2819 return delta * (np.abs(r) - 0.5 * delta)2820 z = np.random.randn(10, 2)2821 w = np.vectorize(xfunc, otypes=[np.float64])(z[:,0], z[:,1])2822 assert_func_equal(special.huber, w, z, rtol=1e-13, atol=1e-13)2823def test_pseudo_huber():2824 def xfunc(delta, r):2825 if delta < 0:2826 return np.inf2827 elif (not delta) or (not r):2828 return 02829 else:2830 return delta**2 * (np.sqrt(1 + (r/delta)**2) - 1)2831 z = np.array(np.random.randn(10, 2).tolist() + [[0, 0.5], [0.5, 0]])2832 w = np.vectorize(xfunc, otypes=[np.float64])(z[:,0], z[:,1])...
test_cython_special.py
Source:test_cython_special.py
1from __future__ import division, print_function, absolute_import2from itertools import product3from numpy.testing import assert_allclose4import pytest5from scipy import special6from scipy.special import cython_special7int_points = [-10, -1, 1, 10]8real_points = [-10.0, -1.0, 1.0, 10.0]9complex_points = [complex(*tup) for tup in product(real_points, repeat=2)]10CYTHON_SIGNATURE_MAP = {11 'f': 'float',12 'd': 'double',13 'g': 'long double',14 'F': 'float complex',15 'D': 'double complex',16 'G': 'long double complex',17 'i':'int',18 'l': 'long'19}20TEST_POINTS = {21 'f': real_points,22 'd': real_points,23 'g': real_points,24 'F': complex_points,25 'D': complex_points,26 'G': complex_points,27 'i': int_points,28 'l': int_points,29}30PARAMS = [31 (special.agm, cython_special.agm, ('dd',), None),32 (special.airy, cython_special._airy_pywrap, ('d', 'D'), None),33 (special.airye, cython_special._airye_pywrap, ('d', 'D'), None),34 (special.bdtr, cython_special.bdtr, ('lld', 'ddd'), None),35 (special.bdtrc, cython_special.bdtrc, ('lld', 'ddd'), None),36 (special.bdtri, cython_special.bdtri, ('lld', 'ddd'), None),37 (special.bdtrik, cython_special.bdtrik, ('ddd',), None),38 (special.bdtrin, cython_special.bdtrin, ('ddd',), None),39 (special.bei, cython_special.bei, ('d',), None),40 (special.beip, cython_special.beip, ('d',), None),41 (special.ber, cython_special.ber, ('d',), None),42 (special.berp, cython_special.berp, ('d',), None),43 (special.besselpoly, cython_special.besselpoly, ('ddd',), None),44 (special.beta, cython_special.beta, ('dd',), None),45 (special.betainc, cython_special.betainc, ('ddd',), None),46 (special.betaincinv, cython_special.betaincinv, ('ddd',), None),47 (special.betaln, cython_special.betaln, ('dd',), None),48 (special.binom, cython_special.binom, ('dd',), None),49 (special.boxcox, cython_special.boxcox, ('dd',), None),50 (special.boxcox1p, cython_special.boxcox1p, ('dd',), None),51 (special.btdtr, cython_special.btdtr, ('ddd',), None),52 (special.btdtri, cython_special.btdtri, ('ddd',), None),53 (special.btdtria, cython_special.btdtria, ('ddd',), None),54 (special.btdtrib, cython_special.btdtrib, ('ddd',), None),55 (special.cbrt, cython_special.cbrt, ('d',), None),56 (special.chdtr, cython_special.chdtr, ('dd',), None),57 (special.chdtrc, cython_special.chdtrc, ('dd',), None),58 (special.chdtri, cython_special.chdtri, ('dd',), None),59 (special.chdtriv, cython_special.chdtriv, ('dd',), None),60 (special.chndtr, cython_special.chndtr, ('ddd',), None),61 (special.chndtridf, cython_special.chndtridf, ('ddd',), None),62 (special.chndtrinc, cython_special.chndtrinc, ('ddd',), None),63 (special.chndtrix, cython_special.chndtrix, ('ddd',), None),64 (special.cosdg, cython_special.cosdg, ('d',), None),65 (special.cosm1, cython_special.cosm1, ('d',), None),66 (special.cotdg, cython_special.cotdg, ('d',), None),67 (special.dawsn, cython_special.dawsn, ('d', 'D'), None),68 (special.ellipe, cython_special.ellipe, ('d',), None),69 (special.ellipeinc, cython_special.ellipeinc, ('dd',), None),70 (special.ellipj, cython_special._ellipj_pywrap, ('dd',), None),71 (special.ellipkinc, cython_special.ellipkinc, ('dd',), None),72 (special.ellipkm1, cython_special.ellipkm1, ('d',), None),73 (special.entr, cython_special.entr, ('d',), None),74 (special.erf, cython_special.erf, ('d', 'D'), None),75 (special.erfc, cython_special.erfc, ('d', 'D'), None),76 (special.erfcx, cython_special.erfcx, ('d', 'D'), None),77 (special.erfi, cython_special.erfi, ('d', 'D'), None),78 (special.eval_chebyc, cython_special.eval_chebyc, ('dd', 'dD', 'ld'), None),79 (special.eval_chebys, cython_special.eval_chebys, ('dd', 'dD', 'ld'),80 'd and l differ for negative int'),81 (special.eval_chebyt, cython_special.eval_chebyt, ('dd', 'dD', 'ld'),82 'd and l differ for negative int'),83 (special.eval_chebyu, cython_special.eval_chebyu, ('dd', 'dD', 'ld'),84 'd and l differ for negative int'),85 (special.eval_gegenbauer, cython_special.eval_gegenbauer, ('ddd', 'ddD', 'ldd'),86 'd and l differ for negative int'),87 (special.eval_genlaguerre, cython_special.eval_genlaguerre, ('ddd', 'ddD', 'ldd'),88 'd and l differ for negative int'),89 (special.eval_hermite, cython_special.eval_hermite, ('ld',), None),90 (special.eval_hermitenorm, cython_special.eval_hermitenorm, ('ld',), None),91 (special.eval_jacobi, cython_special.eval_jacobi, ('dddd', 'dddD', 'lddd'),92 'd and l differ for negative int'),93 (special.eval_laguerre, cython_special.eval_laguerre, ('dd', 'dD', 'ld'),94 'd and l differ for negative int'),95 (special.eval_legendre, cython_special.eval_legendre, ('dd', 'dD', 'ld'), None),96 (special.eval_sh_chebyt, cython_special.eval_sh_chebyt, ('dd', 'dD', 'ld'), None),97 (special.eval_sh_chebyu, cython_special.eval_sh_chebyu, ('dd', 'dD', 'ld'),98 'd and l differ for negative int'),99 (special.eval_sh_jacobi, cython_special.eval_sh_jacobi, ('dddd', 'dddD', 'lddd'),100 'd and l differ for negative int'),101 (special.eval_sh_legendre, cython_special.eval_sh_legendre, ('dd', 'dD', 'ld'), None),102 (special.exp1, cython_special.exp1, ('d', 'D'), None),103 (special.exp10, cython_special.exp10, ('d',), None),104 (special.exp2, cython_special.exp2, ('d',), None),105 (special.expi, cython_special.expi, ('d', 'D'), None),106 (special.expit, cython_special.expit, ('f', 'd', 'g'), None),107 (special.expm1, cython_special.expm1, ('d', 'D'), None),108 (special.expn, cython_special.expn, ('ld', 'dd'), None),109 (special.exprel, cython_special.exprel, ('d',), None),110 (special.fdtr, cython_special.fdtr, ('ddd',), None),111 (special.fdtrc, cython_special.fdtrc, ('ddd',), None),112 (special.fdtri, cython_special.fdtri, ('ddd',), None),113 (special.fdtridfd, cython_special.fdtridfd, ('ddd',), None),114 (special.fresnel, cython_special._fresnel_pywrap, ('d', 'D'), None),115 (special.gamma, cython_special.gamma, ('d', 'D'), None),116 (special.gammainc, cython_special.gammainc, ('dd',), None),117 (special.gammaincc, cython_special.gammaincc, ('dd',), None),118 (special.gammainccinv, cython_special.gammainccinv, ('dd',), None),119 (special.gammaincinv, cython_special.gammaincinv, ('dd',), None),120 (special.gammaln, cython_special.gammaln, ('d',), None),121 (special.gammasgn, cython_special.gammasgn, ('d',), None),122 (special.gdtr, cython_special.gdtr, ('ddd',), None),123 (special.gdtrc, cython_special.gdtrc, ('ddd',), None),124 (special.gdtria, cython_special.gdtria, ('ddd',), None),125 (special.gdtrib, cython_special.gdtrib, ('ddd',), None),126 (special.gdtrix, cython_special.gdtrix, ('ddd',), None),127 (special.hankel1, cython_special.hankel1, ('dD',), None),128 (special.hankel1e, cython_special.hankel1e, ('dD',), None),129 (special.hankel2, cython_special.hankel2, ('dD',), None),130 (special.hankel2e, cython_special.hankel2e, ('dD',), None),131 (special.huber, cython_special.huber, ('dd',), None),132 (special.hyp0f1, cython_special.hyp0f1, ('dd', 'dD'), None),133 (special.hyp1f1, cython_special.hyp1f1, ('ddd', 'ddD'), None),134 (special.hyp2f1, cython_special.hyp2f1, ('dddd', 'dddD'), None),135 (special.hyperu, cython_special.hyperu, ('ddd',), None),136 (special.i0, cython_special.i0, ('d',), None),137 (special.i0e, cython_special.i0e, ('d',), None),138 (special.i1, cython_special.i1, ('d',), None),139 (special.i1e, cython_special.i1e, ('d',), None),140 (special.inv_boxcox, cython_special.inv_boxcox, ('dd',), None),141 (special.inv_boxcox1p, cython_special.inv_boxcox1p, ('dd',), None),142 (special.it2i0k0, cython_special._it2i0k0_pywrap, ('d',), None),143 (special.it2j0y0, cython_special._it2j0y0_pywrap, ('d',), None),144 (special.it2struve0, cython_special.it2struve0, ('d',), None),145 (special.itairy, cython_special._itairy_pywrap, ('d',), None),146 (special.iti0k0, cython_special._iti0k0_pywrap, ('d',), None),147 (special.itj0y0, cython_special._itj0y0_pywrap, ('d',), None),148 (special.itmodstruve0, cython_special.itmodstruve0, ('d',), None),149 (special.itstruve0, cython_special.itstruve0, ('d',), None),150 (special.iv, cython_special.iv, ('dd', 'dD'), None),151 (special.ive, cython_special.ive, ('dd', 'dD'), None),152 (special.j0, cython_special.j0, ('d',), None),153 (special.j1, cython_special.j1, ('d',), None),154 (special.jv, cython_special.jv, ('dd', 'dD'), None),155 (special.jve, cython_special.jve, ('dd', 'dD'), None),156 (special.k0, cython_special.k0, ('d',), None),157 (special.k0e, cython_special.k0e, ('d',), None),158 (special.k1, cython_special.k1, ('d',), None),159 (special.k1e, cython_special.k1e, ('d',), None),160 (special.kei, cython_special.kei, ('d',), None),161 (special.keip, cython_special.keip, ('d',), None),162 (special.kelvin, cython_special._kelvin_pywrap, ('d',), None),163 (special.ker, cython_special.ker, ('d',), None),164 (special.kerp, cython_special.kerp, ('d',), None),165 (special.kl_div, cython_special.kl_div, ('dd',), None),166 (special.kn, cython_special.kn, ('ld', 'dd'), None),167 (special.kolmogi, cython_special.kolmogi, ('d',), None),168 (special.kolmogorov, cython_special.kolmogorov, ('d',), None),169 (special.kv, cython_special.kv, ('dd', 'dD'), None),170 (special.kve, cython_special.kve, ('dd', 'dD'), None),171 (special.log1p, cython_special.log1p, ('d', 'D'), None),172 (special.log_ndtr, cython_special.log_ndtr, ('d', 'D'), None),173 (special.loggamma, cython_special.loggamma, ('D',), None),174 (special.logit, cython_special.logit, ('f', 'd', 'g'), None),175 (special.lpmv, cython_special.lpmv, ('ddd',), None),176 (special.mathieu_a, cython_special.mathieu_a, ('dd',), None),177 (special.mathieu_b, cython_special.mathieu_b, ('dd',), None),178 (special.mathieu_cem, cython_special._mathieu_cem_pywrap, ('ddd',), None),179 (special.mathieu_modcem1, cython_special._mathieu_modcem1_pywrap, ('ddd',), None),180 (special.mathieu_modcem2, cython_special._mathieu_modcem2_pywrap, ('ddd',), None),181 (special.mathieu_modsem1, cython_special._mathieu_modsem1_pywrap, ('ddd',), None),182 (special.mathieu_modsem2, cython_special._mathieu_modsem2_pywrap, ('ddd',), None),183 (special.mathieu_sem, cython_special._mathieu_sem_pywrap, ('ddd',), None),184 (special.modfresnelm, cython_special._modfresnelm_pywrap, ('d',), None),185 (special.modfresnelp, cython_special._modfresnelp_pywrap, ('d',), None),186 (special.modstruve, cython_special.modstruve, ('dd',), None),187 (special.nbdtr, cython_special.nbdtr, ('lld', 'ddd'), None),188 (special.nbdtrc, cython_special.nbdtrc, ('lld', 'ddd'), None),189 (special.nbdtri, cython_special.nbdtri, ('lld', 'ddd'), None),190 (special.nbdtrik, cython_special.nbdtrik, ('ddd',), None),191 (special.nbdtrin, cython_special.nbdtrin, ('ddd',), None),192 (special.ncfdtr, cython_special.ncfdtr, ('dddd',), None),193 (special.ncfdtri, cython_special.ncfdtri, ('dddd',), None),194 (special.ncfdtridfd, cython_special.ncfdtridfd, ('dddd',), None),195 (special.ncfdtridfn, cython_special.ncfdtridfn, ('dddd',), None),196 (special.ncfdtrinc, cython_special.ncfdtrinc, ('dddd',), None),197 (special.nctdtr, cython_special.nctdtr, ('ddd',), None),198 (special.nctdtridf, cython_special.nctdtridf, ('ddd',), None),199 (special.nctdtrinc, cython_special.nctdtrinc, ('ddd',), None),200 (special.nctdtrit, cython_special.nctdtrit, ('ddd',), None),201 (special.ndtr, cython_special.ndtr, ('d', 'D'), None),202 (special.ndtri, cython_special.ndtri, ('d',), None),203 (special.nrdtrimn, cython_special.nrdtrimn, ('ddd',), None),204 (special.nrdtrisd, cython_special.nrdtrisd, ('ddd',), None),205 (special.obl_ang1, cython_special._obl_ang1_pywrap, ('dddd',), None),206 (special.obl_ang1_cv, cython_special._obl_ang1_cv_pywrap, ('ddddd',), None),207 (special.obl_cv, cython_special.obl_cv, ('ddd',), None),208 (special.obl_rad1, cython_special._obl_rad1_pywrap, ('dddd',), "see gh-6211"),209 (special.obl_rad1_cv, cython_special._obl_rad1_cv_pywrap, ('ddddd',), "see gh-6211"),210 (special.obl_rad2, cython_special._obl_rad2_pywrap, ('dddd',), "see gh-6211"),211 (special.obl_rad2_cv, cython_special._obl_rad2_cv_pywrap, ('ddddd',), "see gh-6211"),212 (special.pbdv, cython_special._pbdv_pywrap, ('dd',), None),213 (special.pbvv, cython_special._pbvv_pywrap, ('dd',), None),214 (special.pbwa, cython_special._pbwa_pywrap, ('dd',), None),215 (special.pdtr, cython_special.pdtr, ('ld', 'dd'), None),216 (special.pdtrc, cython_special.pdtrc, ('ld', 'dd'), None),217 (special.pdtri, cython_special.pdtri, ('ld', 'dd'), None),218 (special.pdtrik, cython_special.pdtrik, ('dd',), None),219 (special.poch, cython_special.poch, ('dd',), None),220 (special.pro_ang1, cython_special._pro_ang1_pywrap, ('dddd',), None),221 (special.pro_ang1_cv, cython_special._pro_ang1_cv_pywrap, ('ddddd',), None),222 (special.pro_cv, cython_special.pro_cv, ('ddd',), None),223 (special.pro_rad1, cython_special._pro_rad1_pywrap, ('dddd',), "see gh-6211"),224 (special.pro_rad1_cv, cython_special._pro_rad1_cv_pywrap, ('ddddd',), "see gh-6211"),225 (special.pro_rad2, cython_special._pro_rad2_pywrap, ('dddd',), "see gh-6211"),226 (special.pro_rad2_cv, cython_special._pro_rad2_cv_pywrap, ('ddddd',), "see gh-6211"),227 (special.pseudo_huber, cython_special.pseudo_huber, ('dd',), None),228 (special.psi, cython_special.psi, ('d', 'D'), None),229 (special.radian, cython_special.radian, ('ddd',), None),230 (special.rel_entr, cython_special.rel_entr, ('dd',), None),231 (special.rgamma, cython_special.rgamma, ('d', 'D'), None),232 (special.round, cython_special.round, ('d',), None),233 (special.shichi, cython_special._shichi_pywrap, ('d', 'D'), None),234 (special.sici, cython_special._sici_pywrap, ('d', 'D'), None),235 (special.sindg, cython_special.sindg, ('d',), None),236 (special.smirnov, cython_special.smirnov, ('ld', 'dd'), None),237 (special.smirnovi, cython_special.smirnovi, ('ld', 'dd'), None),238 (special.spence, cython_special.spence, ('d', 'D'), None),239 (special.sph_harm, cython_special.sph_harm, ('lldd', 'dddd'), None),240 (special.stdtr, cython_special.stdtr, ('dd',), None),241 (special.stdtridf, cython_special.stdtridf, ('dd',), None),242 (special.stdtrit, cython_special.stdtrit, ('dd',), None),243 (special.struve, cython_special.struve, ('dd',), None),244 (special.tandg, cython_special.tandg, ('d',), None),245 (special.tklmbda, cython_special.tklmbda, ('dd',), None),246 (special.wofz, cython_special.wofz, ('D',), None),247 (special.wrightomega, cython_special.wrightomega, ('D',), None),248 (special.xlog1py, cython_special.xlog1py, ('dd', 'DD'), None),249 (special.xlogy, cython_special.xlogy, ('dd', 'DD'), None),250 (special.y0, cython_special.y0, ('d',), None),251 (special.y1, cython_special.y1, ('d',), None),252 (special.yn, cython_special.yn, ('ld', 'dd'), None),253 (special.yv, cython_special.yv, ('dd', 'dD'), None),254 (special.yve, cython_special.yve, ('dd', 'dD'), None),255 (special.zetac, cython_special.zetac, ('d',), None),256 (special.owens_t, cython_special.owens_t, ('dd',), None)257]258IDS = [x[0].__name__ for x in PARAMS]259def _generate_test_points(typecodes):260 axes = tuple(map(lambda x: TEST_POINTS[x], typecodes))261 pts = list(product(*axes))262 return pts263def test_cython_api_completeness():264 # Check that everything is tested265 skip = {'hyp2f0', 'hyp1f2', 'hyp3f0'}266 for name in dir(cython_special):267 func = getattr(cython_special, name)268 if callable(func) and not (name.startswith('_') or name in skip):269 for _, cyfun, _, _ in PARAMS:270 if cyfun is func:271 break272 else:273 raise RuntimeError("{} missing from tests!".format(name))274@pytest.mark.parametrize("param", PARAMS, ids=IDS)275def test_cython_api(param):276 pyfunc, cyfunc, specializations, knownfailure = param277 if knownfailure:278 pytest.xfail(reason=knownfailure)279 # Check which parameters are expected to be fused types280 values = [set() for code in specializations[0]]281 for typecodes in specializations:282 for j, v in enumerate(typecodes):283 values[j].add(v)284 seen = set()285 is_fused_code = [False] * len(values)286 for j, v in enumerate(values):287 vv = tuple(sorted(v))288 if vv in seen:289 continue290 is_fused_code[j] = (len(v) > 1)291 seen.add(vv)292 # Check results293 for typecodes in specializations:294 # Pick the correct specialized function295 signature = [CYTHON_SIGNATURE_MAP[code]296 for j, code in enumerate(typecodes)297 if is_fused_code[j]]298 if signature:299 cy_spec_func = cyfunc[tuple(signature)]300 else:301 signature = None302 cy_spec_func = cyfunc303 # Test it304 pts = _generate_test_points(typecodes)305 for pt in pts:306 pyval = pyfunc(*pt)307 cyval = cy_spec_func(*pt)...
html.js
Source:html.js
1'use strict';2var NS = exports.NAMESPACES = {3 HTML: 'http://www.w3.org/1999/xhtml',4 MATHML: 'http://www.w3.org/1998/Math/MathML',5 SVG: 'http://www.w3.org/2000/svg',6 XLINK: 'http://www.w3.org/1999/xlink',7 XML: 'http://www.w3.org/XML/1998/namespace',8 XMLNS: 'http://www.w3.org/2000/xmlns/'9};10exports.ATTRS = {11 TYPE: 'type',12 ACTION: 'action',13 ENCODING: 'encoding',14 PROMPT: 'prompt',15 NAME: 'name',16 COLOR: 'color',17 FACE: 'face',18 SIZE: 'size'19};20exports.DOCUMENT_MODE = {21 NO_QUIRKS: 'no-quirks',22 QUIRKS: 'quirks',23 LIMITED_QUIRKS: 'limited-quirks'24};25var $ = exports.TAG_NAMES = {26 A: 'a',27 ADDRESS: 'address',28 ANNOTATION_XML: 'annotation-xml',29 APPLET: 'applet',30 AREA: 'area',31 ARTICLE: 'article',32 ASIDE: 'aside',33 B: 'b',34 BASE: 'base',35 BASEFONT: 'basefont',36 BGSOUND: 'bgsound',37 BIG: 'big',38 BLOCKQUOTE: 'blockquote',39 BODY: 'body',40 BR: 'br',41 BUTTON: 'button',42 CAPTION: 'caption',43 CENTER: 'center',44 CODE: 'code',45 COL: 'col',46 COLGROUP: 'colgroup',47 DD: 'dd',48 DESC: 'desc',49 DETAILS: 'details',50 DIALOG: 'dialog',51 DIR: 'dir',52 DIV: 'div',53 DL: 'dl',54 DT: 'dt',55 EM: 'em',56 EMBED: 'embed',57 FIELDSET: 'fieldset',58 FIGCAPTION: 'figcaption',59 FIGURE: 'figure',60 FONT: 'font',61 FOOTER: 'footer',62 FOREIGN_OBJECT: 'foreignObject',63 FORM: 'form',64 FRAME: 'frame',65 FRAMESET: 'frameset',66 H1: 'h1',67 H2: 'h2',68 H3: 'h3',69 H4: 'h4',70 H5: 'h5',71 H6: 'h6',72 HEAD: 'head',73 HEADER: 'header',74 HGROUP: 'hgroup',75 HR: 'hr',76 HTML: 'html',77 I: 'i',78 IMG: 'img',79 IMAGE: 'image',80 INPUT: 'input',81 IFRAME: 'iframe',82 KEYGEN: 'keygen',83 LABEL: 'label',84 LI: 'li',85 LINK: 'link',86 LISTING: 'listing',87 MAIN: 'main',88 MALIGNMARK: 'malignmark',89 MARQUEE: 'marquee',90 MATH: 'math',91 MENU: 'menu',92 MENUITEM: 'menuitem',93 META: 'meta',94 MGLYPH: 'mglyph',95 MI: 'mi',96 MO: 'mo',97 MN: 'mn',98 MS: 'ms',99 MTEXT: 'mtext',100 NAV: 'nav',101 NOBR: 'nobr',102 NOFRAMES: 'noframes',103 NOEMBED: 'noembed',104 NOSCRIPT: 'noscript',105 OBJECT: 'object',106 OL: 'ol',107 OPTGROUP: 'optgroup',108 OPTION: 'option',109 P: 'p',110 PARAM: 'param',111 PLAINTEXT: 'plaintext',112 PRE: 'pre',113 RB: 'rb',114 RP: 'rp',115 RT: 'rt',116 RTC: 'rtc',117 RUBY: 'ruby',118 S: 's',119 SCRIPT: 'script',120 SECTION: 'section',121 SELECT: 'select',122 SOURCE: 'source',123 SMALL: 'small',124 SPAN: 'span',125 STRIKE: 'strike',126 STRONG: 'strong',127 STYLE: 'style',128 SUB: 'sub',129 SUMMARY: 'summary',130 SUP: 'sup',131 TABLE: 'table',132 TBODY: 'tbody',133 TEMPLATE: 'template',134 TEXTAREA: 'textarea',135 TFOOT: 'tfoot',136 TD: 'td',137 TH: 'th',138 THEAD: 'thead',139 TITLE: 'title',140 TR: 'tr',141 TRACK: 'track',142 TT: 'tt',143 U: 'u',144 UL: 'ul',145 SVG: 'svg',146 VAR: 'var',147 WBR: 'wbr',148 XMP: 'xmp'149};150var SPECIAL_ELEMENTS = exports.SPECIAL_ELEMENTS = Object.create(null);151SPECIAL_ELEMENTS[NS.HTML] = Object.create(null);152SPECIAL_ELEMENTS[NS.HTML][$.ADDRESS] = true;153SPECIAL_ELEMENTS[NS.HTML][$.APPLET] = true;154SPECIAL_ELEMENTS[NS.HTML][$.AREA] = true;155SPECIAL_ELEMENTS[NS.HTML][$.ARTICLE] = true;156SPECIAL_ELEMENTS[NS.HTML][$.ASIDE] = true;157SPECIAL_ELEMENTS[NS.HTML][$.BASE] = true;158SPECIAL_ELEMENTS[NS.HTML][$.BASEFONT] = true;159SPECIAL_ELEMENTS[NS.HTML][$.BGSOUND] = true;160SPECIAL_ELEMENTS[NS.HTML][$.BLOCKQUOTE] = true;161SPECIAL_ELEMENTS[NS.HTML][$.BODY] = true;162SPECIAL_ELEMENTS[NS.HTML][$.BR] = true;163SPECIAL_ELEMENTS[NS.HTML][$.BUTTON] = true;164SPECIAL_ELEMENTS[NS.HTML][$.CAPTION] = true;165SPECIAL_ELEMENTS[NS.HTML][$.CENTER] = true;166SPECIAL_ELEMENTS[NS.HTML][$.COL] = true;167SPECIAL_ELEMENTS[NS.HTML][$.COLGROUP] = true;168SPECIAL_ELEMENTS[NS.HTML][$.DD] = true;169SPECIAL_ELEMENTS[NS.HTML][$.DETAILS] = true;170SPECIAL_ELEMENTS[NS.HTML][$.DIR] = true;171SPECIAL_ELEMENTS[NS.HTML][$.DIV] = true;172SPECIAL_ELEMENTS[NS.HTML][$.DL] = true;173SPECIAL_ELEMENTS[NS.HTML][$.DT] = true;174SPECIAL_ELEMENTS[NS.HTML][$.EMBED] = true;175SPECIAL_ELEMENTS[NS.HTML][$.FIELDSET] = true;176SPECIAL_ELEMENTS[NS.HTML][$.FIGCAPTION] = true;177SPECIAL_ELEMENTS[NS.HTML][$.FIGURE] = true;178SPECIAL_ELEMENTS[NS.HTML][$.FOOTER] = true;179SPECIAL_ELEMENTS[NS.HTML][$.FORM] = true;180SPECIAL_ELEMENTS[NS.HTML][$.FRAME] = true;181SPECIAL_ELEMENTS[NS.HTML][$.FRAMESET] = true;182SPECIAL_ELEMENTS[NS.HTML][$.H1] = true;183SPECIAL_ELEMENTS[NS.HTML][$.H2] = true;184SPECIAL_ELEMENTS[NS.HTML][$.H3] = true;185SPECIAL_ELEMENTS[NS.HTML][$.H4] = true;186SPECIAL_ELEMENTS[NS.HTML][$.H5] = true;187SPECIAL_ELEMENTS[NS.HTML][$.H6] = true;188SPECIAL_ELEMENTS[NS.HTML][$.HEAD] = true;189SPECIAL_ELEMENTS[NS.HTML][$.HEADER] = true;190SPECIAL_ELEMENTS[NS.HTML][$.HGROUP] = true;191SPECIAL_ELEMENTS[NS.HTML][$.HR] = true;192SPECIAL_ELEMENTS[NS.HTML][$.HTML] = true;193SPECIAL_ELEMENTS[NS.HTML][$.IFRAME] = true;194SPECIAL_ELEMENTS[NS.HTML][$.IMG] = true;195SPECIAL_ELEMENTS[NS.HTML][$.INPUT] = true;196SPECIAL_ELEMENTS[NS.HTML][$.LI] = true;197SPECIAL_ELEMENTS[NS.HTML][$.LINK] = true;198SPECIAL_ELEMENTS[NS.HTML][$.LISTING] = true;199SPECIAL_ELEMENTS[NS.HTML][$.MAIN] = true;200SPECIAL_ELEMENTS[NS.HTML][$.MARQUEE] = true;201SPECIAL_ELEMENTS[NS.HTML][$.MENU] = true;202SPECIAL_ELEMENTS[NS.HTML][$.META] = true;203SPECIAL_ELEMENTS[NS.HTML][$.NAV] = true;204SPECIAL_ELEMENTS[NS.HTML][$.NOEMBED] = true;205SPECIAL_ELEMENTS[NS.HTML][$.NOFRAMES] = true;206SPECIAL_ELEMENTS[NS.HTML][$.NOSCRIPT] = true;207SPECIAL_ELEMENTS[NS.HTML][$.OBJECT] = true;208SPECIAL_ELEMENTS[NS.HTML][$.OL] = true;209SPECIAL_ELEMENTS[NS.HTML][$.P] = true;210SPECIAL_ELEMENTS[NS.HTML][$.PARAM] = true;211SPECIAL_ELEMENTS[NS.HTML][$.PLAINTEXT] = true;212SPECIAL_ELEMENTS[NS.HTML][$.PRE] = true;213SPECIAL_ELEMENTS[NS.HTML][$.SCRIPT] = true;214SPECIAL_ELEMENTS[NS.HTML][$.SECTION] = true;215SPECIAL_ELEMENTS[NS.HTML][$.SELECT] = true;216SPECIAL_ELEMENTS[NS.HTML][$.SOURCE] = true;217SPECIAL_ELEMENTS[NS.HTML][$.STYLE] = true;218SPECIAL_ELEMENTS[NS.HTML][$.SUMMARY] = true;219SPECIAL_ELEMENTS[NS.HTML][$.TABLE] = true;220SPECIAL_ELEMENTS[NS.HTML][$.TBODY] = true;221SPECIAL_ELEMENTS[NS.HTML][$.TD] = true;222SPECIAL_ELEMENTS[NS.HTML][$.TEMPLATE] = true;223SPECIAL_ELEMENTS[NS.HTML][$.TEXTAREA] = true;224SPECIAL_ELEMENTS[NS.HTML][$.TFOOT] = true;225SPECIAL_ELEMENTS[NS.HTML][$.TH] = true;226SPECIAL_ELEMENTS[NS.HTML][$.THEAD] = true;227SPECIAL_ELEMENTS[NS.HTML][$.TITLE] = true;228SPECIAL_ELEMENTS[NS.HTML][$.TR] = true;229SPECIAL_ELEMENTS[NS.HTML][$.TRACK] = true;230SPECIAL_ELEMENTS[NS.HTML][$.UL] = true;231SPECIAL_ELEMENTS[NS.HTML][$.WBR] = true;232SPECIAL_ELEMENTS[NS.HTML][$.XMP] = true;233SPECIAL_ELEMENTS[NS.MATHML] = Object.create(null);234SPECIAL_ELEMENTS[NS.MATHML][$.MI] = true;235SPECIAL_ELEMENTS[NS.MATHML][$.MO] = true;236SPECIAL_ELEMENTS[NS.MATHML][$.MN] = true;237SPECIAL_ELEMENTS[NS.MATHML][$.MS] = true;238SPECIAL_ELEMENTS[NS.MATHML][$.MTEXT] = true;239SPECIAL_ELEMENTS[NS.MATHML][$.ANNOTATION_XML] = true;240SPECIAL_ELEMENTS[NS.SVG] = Object.create(null);241SPECIAL_ELEMENTS[NS.SVG][$.TITLE] = true;242SPECIAL_ELEMENTS[NS.SVG][$.FOREIGN_OBJECT] = true;...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!